[SOLVED] Cannot open file "wxbase31ud.lib" LNK1104 error Topic is solved
[SOLVED] Cannot open file "wxbase31ud.lib" LNK1104 error
Hi.
I was looking to get started building GUI to one of my programms, and i have never done GUIs before. I went with the OneLoneCoder's tutorial on GUIs on YT. I followed his instructions and created the same files, and did the same configuration, but i cannot get my file to build.
Once i try to build i get LNK1104 error and the error message says that it cannot open wxbase31ud.lib. I searched the /lib/vc_lib folder and the file wxbase31ud.lib is there.
Im using Visual Studio 2019. To install wxWidgets i downloaded the latest 3.1.3 wxWidgets.zip file and extracted all files into a location. Then proceeded to build it manually by opening build/msw/wx_vc16.sln as i didnt find any higher versions. I used the batch build and used select all option, so im guessing i have built everything there is to build.
I also tried to build using vc15.sln afterwards, but the same error persisted.
Im hoping somebody here has a solution as i cant seem to find any elsewhere.
Thans.
I was looking to get started building GUI to one of my programms, and i have never done GUIs before. I went with the OneLoneCoder's tutorial on GUIs on YT. I followed his instructions and created the same files, and did the same configuration, but i cannot get my file to build.
Once i try to build i get LNK1104 error and the error message says that it cannot open wxbase31ud.lib. I searched the /lib/vc_lib folder and the file wxbase31ud.lib is there.
Im using Visual Studio 2019. To install wxWidgets i downloaded the latest 3.1.3 wxWidgets.zip file and extracted all files into a location. Then proceeded to build it manually by opening build/msw/wx_vc16.sln as i didnt find any higher versions. I used the batch build and used select all option, so im guessing i have built everything there is to build.
I also tried to build using vc15.sln afterwards, but the same error persisted.
Im hoping somebody here has a solution as i cant seem to find any elsewhere.
Thans.
Last edited by Dawis67 on Tue Mar 31, 2020 1:17 am, edited 1 time in total.
Re: Cannot open file "wxbase31ud.lib" LNK1104 error
So building the wxWidgets libraries was successful?Then proceeded to build it manually by opening build/msw/wx_vc16.sln as i didnt find any higher versions. I used the batch build and used select all option, so im guessing i have built everything there is to build.
If yes, then the next step should be to build the "minimal" sample that comes with wxWidgets through the VS project files.
Use the source, Luke!
Re: Cannot open file "wxbase31ud.lib" LNK1104 error
What do you mean by the "minimal" sample? Is it just opening the vs16.sln and just clicking "Build solution"?doublemax wrote: ↑Mon Mar 30, 2020 10:15 pmSo building the wxWidgets libraries was successful?Then proceeded to build it manually by opening build/msw/wx_vc16.sln as i didnt find any higher versions. I used the batch build and used select all option, so im guessing i have built everything there is to build.
If yes, then the next step should be to build the "minimal" sample that comes with wxWidgets through the VS project files.
Re: Cannot open file "wxbase31ud.lib" LNK1104 error
Yes, In <wxdir>/samples/minimal/, use the highest version solution file.
Use the source, Luke!
Re: Cannot open file "wxbase31ud.lib" LNK1104 error
Ok, i opened /samples/minimal/minimal_vc15.sln (the highest i found) and built it with "Build Solution". This however does not seem to change the error in my original GUI sln. It still throws the same linking error.
Re: Cannot open file "wxbase31ud.lib" LNK1104 error
Did it compile and did you actually run the sample?Ok, i opened /samples/minimal/minimal_vc15.sln (the highest i found) and built it with "Build Solution".
This was all just to confirm that the building of the wxWidgets libraries was successful.
If yes, then it's probably just a matter of wrong linker paths, but as i don't know OneLoneCoder's video, i can't tell you exactly what's wrong. But you should be able to take the settings in the sample for comparison.
Use the source, Luke!
Re: Cannot open file "wxbase31ud.lib" LNK1104 error
doublemax wrote: ↑Mon Mar 30, 2020 10:38 pmDid it compile and did you actually run the sample?Ok, i opened /samples/minimal/minimal_vc15.sln (the highest i found) and built it with "Build Solution".
This was all just to confirm that the building of the wxWidgets libraries was successful.
If yes, then it's probably just a matter of wrong linker paths, but as i don't know OneLoneCoder's video, i can't tell you exactly what's wrong. But you should be able to take the settings in the sample for comparison.
Ok, yes i didnt run it. I just built it. Now i ran it and the it worked just fine. A nice window popped up. I will compare the configs
Re: Cannot open file "wxbase31ud.lib" LNK1104 error
Ok, i looked around and compared the linkers additional library directories. The main difference i think is that the file location for the minimal sample file is in the wxWidgets directory while mine isnt. The video instructed to create global variable "wxwin" and use that so:
I have
C++/General:
$(wxwin)/include/msvc;$(wxwin)/include/;
Linker/General
$(wxwin)/include/lib/vc_lib;
I tried adding %(AdditionalLibraryDirectories) at the end of these two, and i also changed $(wxwin)/include/lib/vc_lib; to $(wxwin)/include/lib; to make it more general. None of these things helped.
If it isnt too much to ask you can look at the video and find what he is/i am doing wrong: https://www.youtube.com/watch?v=FOIbK4bJKS8&t=828s
the installation and config starts at 12:50.
I have
C++/General:
$(wxwin)/include/msvc;$(wxwin)/include/;
Linker/General
$(wxwin)/include/lib/vc_lib;
I tried adding %(AdditionalLibraryDirectories) at the end of these two, and i also changed $(wxwin)/include/lib/vc_lib; to $(wxwin)/include/lib; to make it more general. None of these things helped.
If it isnt too much to ask you can look at the video and find what he is/i am doing wrong: https://www.youtube.com/watch?v=FOIbK4bJKS8&t=828s
the installation and config starts at 12:50.
Re: Cannot open file "wxbase31ud.lib" LNK1104 error
What value did you use for the global variable "wxwin"?
Tim S.
Tim S.
Last edited by stahta01 on Mon Mar 30, 2020 11:46 pm, edited 1 time in total.
Re: Cannot open file "wxbase31ud.lib" LNK1104 error
Code: Select all
$(wxwin)/include/lib/vc_lib
Code: Select all
$(wxwin)/lib/vc_lib
Use the source, Luke!
Re: Cannot open file "wxbase31ud.lib" LNK1104 error
Thanks. FFS quite embarrassing error to struggle with for hours. I cant believe i didnt see it. Again, thanks a lotdoublemax wrote: ↑Mon Mar 30, 2020 11:44 pmThis should be:Code: Select all
$(wxwin)/include/lib/vc_lib
Code: Select all
$(wxwin)/lib/vc_lib
-
- In need of some credit
- Posts: 1
- Joined: Sun Apr 02, 2023 3:06 am
Re: [SOLVED] Cannot open file "wxbase31ud.lib" LNK1104 error
I try this end up with successful compilation and runing the projects.
wxmsw32ud_core.lib
wxbase32ud.lib
wxtiffd.lib
wxjpegd.lib
wxpngd.lib
wxzlibd.lib
wxregexud.lib
wxexpatd.lib
Add this library to project propertis of linker->input->Additional Dependecies.
Additional Includes should be,
$(WXWIN)\include;$(WXWIN)\include\msvc
Additional Library Directories
$(wxwin)\lib\vc_lib;%(AdditionalLibraryDirectories)
100% gurrenty it would work fine.
wxmsw32ud_core.lib
wxbase32ud.lib
wxtiffd.lib
wxjpegd.lib
wxpngd.lib
wxzlibd.lib
wxregexud.lib
wxexpatd.lib
Add this library to project propertis of linker->input->Additional Dependecies.
Additional Includes should be,
$(WXWIN)\include;$(WXWIN)\include\msvc
Additional Library Directories
$(wxwin)\lib\vc_lib;%(AdditionalLibraryDirectories)
100% gurrenty it would work fine.