LNK cannot open file wxmsw32ud_core.lib

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
djmoorejr
In need of some credit
In need of some credit
Posts: 3
Joined: Fri May 26, 2023 11:03 pm

LNK cannot open file wxmsw32ud_core.lib

Post by djmoorejr »

Hello,

This is probably a basic question. I am new to c++ and wxWidgets. I've been trying to get wx installed in VS2022, but get the following error when I try to build a solution. LNK cannot open file wxmsw32ud_core.lib I've googled this and found the instructions about setting the environmental variables, and project properties c/c++ additional include directories to \include and \include\msvc, Also the Linker additional include directories to \lib\vc_lib and \lib\vc_x64_lib.

The thing that seems different from the other questions I've seen answered before is that I can't find this file in the C:\wxWidgets-3.2.2.1\lib\vc_lib file or in C:\wxWidgets-3.2.2.1\lib\vc_x64_lib. I find a file with the same name, but a .pdb file extension. I'm quessing that the .lib file wasn't generated when I built the Visual Studio Solution.

I downloaded the zip file from the official wsWidgets page and extracted to C:\wxWidgets-3.2.2.1. Then I navigated to C:\wxWidgets-3.2.2.1\build\msw and clicked on wx_vc17.sln. VS opened up and I selected Build , batch build, select all build. the build took almost 30 minutes I had two errors:
Error C1083 Cannot open include file: 'winstring.h': No such file or directory (compiling source file ..\..\src\msw\rt\utilsrt.cpp) core C:\wxWidgets-3.2.2.1\include\wx\msw\rt\utils.h 20

Error C1083 Cannot open include file: 'winstring.h': No such file or directory (compiling source file ..\..\src\msw\rt\notifmsgrt.cpp) core C:\wxWidgets-3.2.2.1\include\wx\msw\rt\utils.h 20

I couldn't figure those out so I tried building a small test project and got the error above. Anyone have any ideas. Any help is much appreciated.

Thanks
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: LNK cannot open file wxmsw32ud_core.lib

Post by doublemax »

djmoorejr wrote: Fri May 26, 2023 11:48 pm Then I navigated to C:\wxWidgets-3.2.2.1\build\msw and clicked on wx_vc17.sln. VS opened up and I selected Build , batch build, select all build. the build took almost 30 minutes I had two errors:
It doesn't really make much sense to build all configurations. Usually you only need two.

Try to build "debug" "x64" and "release" "x64" only. Do you get the same errors?
(don't use batch build, just select the respective configuration in the toolbar and build the solution)

If that succeeds, do exactly the same with the "minimal" sample that comes with wxWidgets.
Use the source, Luke!
djmoorejr
In need of some credit
In need of some credit
Posts: 3
Joined: Fri May 26, 2023 11:03 pm

Re: LNK cannot open file wxmsw32ud_core.lib

Post by djmoorejr »

Hello doublemax,

Thanks for looking at this. I gave that a try. What I got is attached.

I ended up installing wxWidgets in code blocks so I don't really need to figure this out, but it would be nice to be able to use Visual Studio.

Thanks
wxWidgets build error.PNG
wxWidgets build error.PNG (9.74 KiB) Viewed 537 times
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: LNK cannot open file wxmsw32ud_core.lib

Post by doublemax »

That's really strange, building with VS is usually straight forward.

Did you get that error while building the libs, or building the minimal sample? It wouldn't make any sense if it happened during building the libs.

When building the sample, make sure to select the same configuration(s) you used when building the libs.

Check the directory <your-wx-base>/lib/
What directory was created? It should be "vc_x64_lib" when you built the configurations i suggested. How exactly are the *.lib files in there named? E.g. the "wxmsw32*" ?
Use the source, Luke!
djmoorejr
In need of some credit
In need of some credit
Posts: 3
Joined: Fri May 26, 2023 11:03 pm

Re: LNK cannot open file wxmsw32ud_core.lib

Post by djmoorejr »

Hello doublmax,

Thanks for looking at this. After much frustration I decided to uninstall Visual Studio and delete all wxWidgets files. I reinstalled Visual Studio and downloaded wxWidgets again. I followed the latest set up video I could find, https://www.youtube.com/watch?v=1fZL13jIbFQ&t=404s , and it worked.

Thanks again for taking the time.

Dave Moore
Post Reply