VS2017 is giving me error LINK : fatal error LNK1181: cannot open input file 'wxbase31u.lib' when I try to build. I know the project works in code blocks when complied with tdm-gcc64.
I build the library using VS2017 developer command prompt command in build/msw:
nmake /f makefile.vc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1
set to release build
include directories:
$WXWIN\include\msvc;$WXWIN\include in ("Properties|C++|General|Additional Include Directories")
$WXWIN\lib\vc_dll in ("Properties|Linker|Additional Library Directories")
linker additional dependencies:
wxmsw31u.lib
wxmsw31u_gl.lib
opengl32.lib
gdi32.lib
glew32.lib
preprocessor:
__WXMSW__
WXUSINGDLL
_UNICODE
_CRT_SECURE_NO_WARNINGS
wxUSE_GLCANVAS
Am I forgetting something in the settings? Not sure what is going on here.
LINK : fatal error LNK1181: cannot open input file 'wxbase31u.lib' Topic is solved
LINK : fatal error LNK1181: cannot open input file 'wxbase31u.lib'
Last edited by almonj on Wed Feb 07, 2018 4:54 pm, edited 1 time in total.
Re: LINK : fatal error LNK1181: cannot open input file 'wxbase31u.lib'
I believe that in the monolithic build, there is no base/core library, wxmsw31u[d].lib contains the wx libraries except the third party ones (and perhaps OpenGL one).
The shared libraries should be in vc_dll and not vc_lib.
Additionally, you are including the MSVC-specific setup.h, so the wx libraries should be autolinked and therefore you so do need to list them.
The shared libraries should be in vc_dll and not vc_lib.
Additionally, you are including the MSVC-specific setup.h, so the wx libraries should be autolinked and therefore you so do need to list them.
Last edited by PB on Wed Feb 07, 2018 3:49 pm, edited 1 time in total.
Re: LINK : fatal error LNK1181: cannot open input file 'wxbase31u.lib'
Hi,
Why do you use MONOLITHIC build?
There is no gain in using it vs. MULTI-LIB solution other than more problems in the long run.
Just rebuild the library without this option and you should be good to go.
Also "UNICODE=1" is set to default starting from the 3.0 so you can safely get rid of this as well.
And finally building the library with "SHARED=1" option on Windows with MSVC is a little weird. Do you have another libraries that you developed with wx to do such a build?
Thank you.
Why do you use MONOLITHIC build?
There is no gain in using it vs. MULTI-LIB solution other than more problems in the long run.
Just rebuild the library without this option and you should be good to go.
Also "UNICODE=1" is set to default starting from the 3.0 so you can safely get rid of this as well.
And finally building the library with "SHARED=1" option on Windows with MSVC is a little weird. Do you have another libraries that you developed with wx to do such a build?
Thank you.
Re: LINK : fatal error LNK1181: cannot open input file 'wxbase31u.lib'
oops, I actually copied that wrong, I did have the vc_dll folder in the linker.PB wrote:I believe that in the monolithic build, there is no base/core library, wxmsw31u[d].lib contains the wx libraries except the third party ones (and perhaps OpenGL one).
The shared libraries should be in vc_dll and not vc_lib.
Additionally, you are including the MSVC-specific setup.h, so the wx libraries should be autolinked and therefore you so do need to list them.
Ok, I will try that. I am used to using TDM-gcc to build wx, those were the settings I used with that compiler. I don't have any special need for the shared option. I'm not experienced with MSVC. Thanks for the helpONEEYEMAN wrote:Hi,
Why do you use MONOLITHIC build?
There is no gain in using it vs. MULTI-LIB solution other than more problems in the long run.
Just rebuild the library without this option and you should be good to go.
Also "UNICODE=1" is set to default starting from the 3.0 so you can safely get rid of this as well.
And finally building the library with "SHARED=1" option on Windows with MSVC is a little weird. Do you have another libraries that you developed with wx to do such a build?
Thank you.
Re: LINK : fatal error LNK1181: cannot open input file 'wxbase31u.lib'
Looks like it worked. Thanks all
Re: LINK : fatal error LNK1181: cannot open input file 'wxbase31u.lib'
Hi,
Moreover, to simplify the build you can open an appropriate solution from build\msw and do: "Build ->Batch Buiuld... -> Select All -> Build".
Then it will build all possible configuration and all you will need is to just compile and link appropriate configuration that can be picked up from the minimal sample solution.
Thank you.
Moreover, to simplify the build you can open an appropriate solution from build\msw and do: "Build ->Batch Buiuld... -> Select All -> Build".
Then it will build all possible configuration and all you will need is to just compile and link appropriate configuration that can be picked up from the minimal sample solution.
Thank you.