Closed JacksiroKe closed 5 years ago
At the time wxWidgets 3.1.2 was released, wxWidgets had not yet support for the automatic library/DLL loading mechanism of VS2019 and erroneously referenced the VS2017 include path. This has been fixed in the wxWidgets git repository. In file include/msvc/wx/setup.h line 68 was modified and lines 70 and 71 were added. You would have to adjust your wxWidgets installation accordingly.
However, since wxWidgets does not provide prebuilt binaries for VS2019, I assume you built the wxWidgets library yourself. And probably you did not make use of the compiler specific prefix. That is, in your installation the library path ../../../lib/vc142_x64_dll
most likely doesn't exist at all; instead you have the wxWidgets link libraries in ../../../lib/vc_x64_dll
.
If this is the case, you have to adjust the properties file wx_setup.props
in folder build
of the wxSQLite3 distribution. Look for the properties wxCompilerPrefix
and wxMsvcVersionAuto
and adjust them as follows:
<wxCompilerPrefix>vc</wxCompilerPrefix>
and
<wxMsvcVersionAuto></wxMsvcVersionAuto>
Thereafter the VS2019 build should work for you.
thanks for your timely response. I didn't expect it so quick since many issues I have raised elsewhere never get response that fast. And now that I manually configured that and am to build wxsqlite3 another ugly error has emerged that I now have no idea to fix
LNK1104 cannot open file 'wxbase31ud.lib' minimal D:\cpp\wxsqlite3\build\LINK 1
MSB6006 "link.exe" exited with code 1104. minimal C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 725
I have checked and seen the wxbase31ud.lib file exists and is being used in one of my other project.
Kindly enlighten me on this so that at least I can be able to build and use wxsqlite3
You were lucky that I was around my computer this morning. :smile:
Regarding the linker error I need more information. What exactly did you try to do? Which configuration did you choose to build? If you tried to Build All, this might explain the problem. The build files coming with wxSQLite3 contain various configurations:
Release/Debug Build static wxSQLite3 library based on static wxWidgets libraries
DLL Release/Debug Build wxSQLite3 DLL based on wxWidgets DLLs
Release/Debug wxDLL Build static wxSQLite3 library based on wxWidgets DLLs
Probably you built only the wxWidgets DLLs, not the static libs. In that case the first mentioned configuration will fail to build, because ../../../lib/vc_x64_lib/wxbase31ud.lib
does not exist.
If this does not solve the issue, then please provide a complete log of the whole build for further inspection.
well thanks for being around your computer.
Anyway just some of the configurations works, since I was trying to do a build all Here is a log for build all:
------ Build started: Project: wxsqlite3, Configuration: Release x64 ------ sqlite3secure.c D:\cpp\wxsqlite3\sqlite3secure\src\fastpbkdf2.c(344,1): warning C4267: 'function': conversion from 'size_t' to 'unsigned int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\fastpbkdf2.c(392,1): warning C4267: 'function': conversion from 'size_t' to 'unsigned int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\chacha20poly1305.c(256,29): warning C4267: 'function': conversion from 'size_t' to 'ULONG', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\codec.c(1831,55): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(220,45): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(810,47): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(967,38): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(1349,16): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data wxsqlite3.cpp wxsqlite3_vc15_wxsqlite3.vcxproj -> D:\cpp\wxsqlite3\build..\lib\vc142_x64_lib\wxsqlite3.lib Done building project "wxsqlite3_vc15_wxsqlite3.vcxproj". ------ Build started: Project: wxsqlite3, Configuration: Release Win32 ------ sqlite3secure.c wxsqlite3.cpp wxsqlite3_vc15_wxsqlite3.vcxproj -> D:\cpp\wxsqlite3\build..\lib\vc142_lib\wxsqlite3.lib ------ Build started: Project: wxsqlite3, Configuration: Release wxDLL x64 ------ sqlite3secure.c D:\cpp\wxsqlite3\sqlite3secure\src\fastpbkdf2.c(344,1): warning C4267: 'function': conversion from 'size_t' to 'unsigned int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\fastpbkdf2.c(392,1): warning C4267: 'function': conversion from 'size_t' to 'unsigned int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\chacha20poly1305.c(256,29): warning C4267: 'function': conversion from 'size_t' to 'ULONG', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\codec.c(1831,55): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(220,45): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(810,47): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(967,38): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(1349,16): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data wxsqlite3.cpp wxsqlite3_vc15_wxsqlite3.vcxproj -> D:\cpp\wxsqlite3\build..\lib\vc142_x64_lib_wxdll\wxsqlite3.lib Done building project "wxsqlite3_vc15_wxsqlite3.vcxproj". ------ Build started: Project: wxsqlite3, Configuration: Release wxDLL Win32 ------ sqlite3secure.c wxsqlite3.cpp wxsqlite3_vc15_wxsqlite3.vcxproj -> D:\cpp\wxsqlite3\build..\lib\vc142_lib_wxdll\wxsqlite3.lib ------ Build started: Project: wxsqlite3, Configuration: DLL Release x64 ------ sqlite3secure.c D:\cpp\wxsqlite3\sqlite3secure\src\fastpbkdf2.c(344,1): warning C4267: 'function': conversion from 'size_t' to 'unsigned int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\fastpbkdf2.c(392,1): warning C4267: 'function': conversion from 'size_t' to 'unsigned int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\chacha20poly1305.c(256,29): warning C4267: 'function': conversion from 'size_t' to 'ULONG', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\codec.c(1831,55): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(220,45): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(810,47): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(967,38): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(1349,16): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data wxsqlite3.cpp LINK : fatal error LNK1104: cannot open file 'wxbase31u.lib' Done building project "wxsqlite3_vc15_wxsqlite3.vcxproj" -- FAILED. ------ Build started: Project: wxsqlite3, Configuration: DLL Release Win32 ------ sqlite3secure.c wxsqlite3.cpp LINK : fatal error LNK1104: cannot open file 'wxbase31u.lib' Done building project "wxsqlite3_vc15_wxsqlite3.vcxproj" -- FAILED. ------ Build started: Project: wxsqlite3, Configuration: DLL Debug x64 ------ sqlite3secure.c D:\cpp\wxsqlite3\sqlite3secure\src\fastpbkdf2.c(344,1): warning C4267: 'function': conversion from 'size_t' to 'unsigned int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\fastpbkdf2.c(392,1): warning C4267: 'function': conversion from 'size_t' to 'unsigned int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\chacha20poly1305.c(256,29): warning C4267: 'function': conversion from 'size_t' to 'ULONG', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\codec.c(1831,55): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(220,45): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(810,47): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(967,38): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(1349,16): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data wxsqlite3.cpp LINK : fatal error LNK1104: cannot open file 'wxbase31ud.lib' Done building project "wxsqlite3_vc15_wxsqlite3.vcxproj" -- FAILED. ------ Build started: Project: wxsqlite3, Configuration: DLL Debug Win32 ------ sqlite3secure.c wxsqlite3.cpp LINK : fatal error LNK1104: cannot open file 'wxbase31ud.lib' Done building project "wxsqlite3_vc15_wxsqlite3.vcxproj" -- FAILED. ------ Build started: Project: wxsqlite3, Configuration: Debug x64 ------ sqlite3secure.c D:\cpp\wxsqlite3\sqlite3secure\src\fastpbkdf2.c(344,1): warning C4267: 'function': conversion from 'size_t' to 'unsigned int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\fastpbkdf2.c(392,1): warning C4267: 'function': conversion from 'size_t' to 'unsigned int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\chacha20poly1305.c(256,29): warning C4267: 'function': conversion from 'size_t' to 'ULONG', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\codec.c(1831,55): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(220,45): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(810,47): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(967,38): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(1349,16): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data wxsqlite3.cpp wxsqlite3_vc15_wxsqlite3.vcxproj -> D:\cpp\wxsqlite3\build..\lib\vc142_x64_lib\wxsqlite3d.lib Done building project "wxsqlite3_vc15_wxsqlite3.vcxproj". ------ Build started: Project: wxsqlite3, Configuration: Debug Win32 ------ sqlite3secure.c wxsqlite3.cpp wxsqlite3_vc15_wxsqlite3.vcxproj -> D:\cpp\wxsqlite3\build..\lib\vc142_lib\wxsqlite3d.lib ------ Build started: Project: wxsqlite3, Configuration: Debug wxDLL x64 ------ sqlite3secure.c D:\cpp\wxsqlite3\sqlite3secure\src\fastpbkdf2.c(344,1): warning C4267: 'function': conversion from 'size_t' to 'unsigned int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\fastpbkdf2.c(392,1): warning C4267: 'function': conversion from 'size_t' to 'unsigned int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\chacha20poly1305.c(256,29): warning C4267: 'function': conversion from 'size_t' to 'ULONG', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\codec.c(1831,55): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(220,45): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(810,47): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(967,38): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data D:\cpp\wxsqlite3\sqlite3secure\src\extensionfunctions.c(1349,16): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data wxsqlite3.cpp wxsqlite3_vc15_wxsqlite3.vcxproj -> D:\cpp\wxsqlite3\build..\lib\vc142_x64_lib_wxdll\wxsqlite3d.lib Done building project "wxsqlite3_vc15_wxsqlite3.vcxproj". ------ Build started: Project: wxsqlite3, Configuration: Debug wxDLL Win32 ------ sqlite3secure.c wxsqlite3.cpp wxsqlite3_vc15_wxsqlite3.vcxproj -> D:\cpp\wxsqlite3\build..\lib\vc142_lib_wxdll\wxsqlite3d.lib ------ Build started: Project: minimal, Configuration: Release x64 ------ minimal.cpp LINK : fatal error LNK1104: cannot open file 'wxbase31u.lib' Done building project "wxsqlite3_vc15_minimal.vcxproj" -- FAILED. ------ Build started: Project: minimal, Configuration: Release Win32 ------ minimal.cpp LINK : fatal error LNK1104: cannot open file 'wxbase31u.lib' Done building project "wxsqlite3_vc15_minimal.vcxproj" -- FAILED. ------ Build started: Project: minimal, Configuration: Release wxDLL x64 ------ minimal.cpp LINK : fatal error LNK1104: cannot open file 'wxbase31u.lib' Done building project "wxsqlite3_vc15_minimal.vcxproj" -- FAILED. ------ Build started: Project: minimal, Configuration: Release wxDLL Win32 ------ minimal.cpp LINK : fatal error LNK1104: cannot open file 'wxbase31u.lib' Done building project "wxsqlite3_vc15_minimal.vcxproj" -- FAILED. ------ Build started: Project: minimal, Configuration: DLL Release x64 ------ minimal.cpp LINK : fatal error LNK1181: cannot open input file 'D:\cpp\wxsqlite3\lib\vc142_x64_dll\wxsqlite3.lib' Done building project "wxsqlite3_vc15_minimal.vcxproj" -- FAILED. ------ Build started: Project: minimal, Configuration: DLL Release Win32 ------ minimal.cpp LINK : fatal error LNK1181: cannot open input file 'D:\cpp\wxsqlite3\lib\vc142_dll\wxsqlite3.lib' Done building project "wxsqlite3_vc15_minimal.vcxproj" -- FAILED. ------ Build started: Project: minimal, Configuration: DLL Debug x64 ------ minimal.cpp LINK : fatal error LNK1104: cannot open file 'D:\cpp\wxsqlite3\lib\vc142_x64_dll\wxsqlite3d.lib' Done building project "wxsqlite3_vc15_minimal.vcxproj" -- FAILED. ------ Build started: Project: minimal, Configuration: DLL Debug Win32 ------ minimal.cpp LINK : fatal error LNK1104: cannot open file 'D:\cpp\wxsqlite3\lib\vc142_dll\wxsqlite3d.lib' Done building project "wxsqlite3_vc15_minimal.vcxproj" -- FAILED. ------ Build started: Project: minimal, Configuration: Debug x64 ------ minimal.cpp LINK : fatal error LNK1104: cannot open file 'wxbase31ud.lib' Done building project "wxsqlite3_vc15_minimal.vcxproj" -- FAILED. ------ Build started: Project: minimal, Configuration: Debug Win32 ------ minimal.cpp LINK : fatal error LNK1104: cannot open file 'wxbase31ud.lib' Done building project "wxsqlite3_vc15_minimal.vcxproj" -- FAILED. ------ Build started: Project: minimal, Configuration: Debug wxDLL x64 ------ minimal.cpp LINK : fatal error LNK1104: cannot open file 'wxbase31ud.lib' Done building project "wxsqlite3_vc15_minimal.vcxproj" -- FAILED. ------ Build started: Project: minimal, Configuration: Debug wxDLL Win32 ------ minimal.cpp LINK : fatal error LNK1104: cannot open file 'wxbase31ud.lib' Done building project "wxsqlite3_vc15_minimal.vcxproj" -- FAILED. ------ Build started: Project: treeview, Configuration: Release x64 ------ foldertree.cpp projectlist.cpp treeviewapp.cpp treeviewsample.cpp Generating Code... LINK : fatal error LNK1104: cannot open file 'wxbase31u.lib' Done building project "wxsqlite3_vc15_treeview.vcxproj" -- FAILED. ------ Build started: Project: treeview, Configuration: Release Win32 ------ foldertree.cpp projectlist.cpp treeviewapp.cpp treeviewsample.cpp Generating Code... LINK : fatal error LNK1104: cannot open file 'wxbase31u.lib' Done building project "wxsqlite3_vc15_treeview.vcxproj" -- FAILED. ------ Build started: Project: treeview, Configuration: Release wxDLL x64 ------ foldertree.cpp projectlist.cpp treeviewapp.cpp treeviewsample.cpp Generating Code... LINK : fatal error LNK1104: cannot open file 'wxbase31u.lib' Done building project "wxsqlite3_vc15_treeview.vcxproj" -- FAILED. ------ Build started: Project: treeview, Configuration: Release wxDLL Win32 ------ foldertree.cpp projectlist.cpp treeviewapp.cpp treeviewsample.cpp Generating Code... LINK : fatal error LNK1104: cannot open file 'wxbase31u.lib' Done building project "wxsqlite3_vc15_treeview.vcxproj" -- FAILED. ------ Build started: Project: treeview, Configuration: DLL Release x64 ------ foldertree.cpp projectlist.cpp treeviewapp.cpp treeviewsample.cpp Generating Code... LINK : fatal error LNK1181: cannot open input file 'D:\cpp\wxsqlite3\lib\vc142_x64_dll\wxsqlite3.lib' Done building project "wxsqlite3_vc15_treeview.vcxproj" -- FAILED. ------ Build started: Project: treeview, Configuration: DLL Release Win32 ------ foldertree.cpp projectlist.cpp treeviewapp.cpp treeviewsample.cpp Generating Code... LINK : fatal error LNK1181: cannot open input file 'D:\cpp\wxsqlite3\lib\vc142_dll\wxsqlite3.lib' Done building project "wxsqlite3_vc15_treeview.vcxproj" -- FAILED. ------ Build started: Project: treeview, Configuration: DLL Debug x64 ------ foldertree.cpp projectlist.cpp treeviewapp.cpp treeviewsample.cpp Generating Code... LINK : fatal error LNK1104: cannot open file 'D:\cpp\wxsqlite3\lib\vc142_x64_dll\wxsqlite3d.lib' Done building project "wxsqlite3_vc15_treeview.vcxproj" -- FAILED. ------ Build started: Project: treeview, Configuration: DLL Debug Win32 ------ foldertree.cpp projectlist.cpp treeviewapp.cpp treeviewsample.cpp Generating Code... LINK : fatal error LNK1104: cannot open file 'D:\cpp\wxsqlite3\lib\vc142_dll\wxsqlite3d.lib' Done building project "wxsqlite3_vc15_treeview.vcxproj" -- FAILED. ------ Build started: Project: treeview, Configuration: Debug x64 ------ foldertree.cpp projectlist.cpp treeviewapp.cpp treeviewsample.cpp Generating Code... LINK : fatal error LNK1104: cannot open file 'wxbase31ud.lib' Done building project "wxsqlite3_vc15_treeview.vcxproj" -- FAILED. ------ Build started: Project: treeview, Configuration: Debug Win32 ------ foldertree.cpp projectlist.cpp treeviewapp.cpp treeviewsample.cpp Generating Code... LINK : fatal error LNK1104: cannot open file 'wxbase31ud.lib' Done building project "wxsqlite3_vc15_treeview.vcxproj" -- FAILED. ------ Build started: Project: treeview, Configuration: Debug wxDLL x64 ------ foldertree.cpp projectlist.cpp treeviewapp.cpp treeviewsample.cpp Generating Code... LINK : fatal error LNK1104: cannot open file 'wxbase31ud.lib' Done building project "wxsqlite3_vc15_treeview.vcxproj" -- FAILED. ------ Build started: Project: treeview, Configuration: Debug wxDLL Win32 ------ foldertree.cpp projectlist.cpp treeviewapp.cpp treeviewsample.cpp Generating Code... LINK : fatal error LNK1104: cannot open file 'wxbase31ud.lib' Done building project "wxsqlite3_vc15_treeview.vcxproj" -- FAILED. ========== Build: 8 succeeded, 28 failed, 0 up-to-date, 0 skipped ==========
I cant figure out which configurations succeeded since the various folders in the bin directory are empty. Then when I select any of the configuration it doesn't get through at all.
LINK : fatal error LNK1104: cannot open file 'wxbase31ud.lib'
is the error coming through
Unfortunately it is not easy to identify the failing builds if a Build All was done. The wxSQLite3 solution contains 3 projects; for each project you have 6 configurations (Release/Debug - all static/static+wxDLL/all DLL) and 2 platforms (32 bit, 64 bit) - that makes 36 builds all in all. In your build, of those only 8 were successful, 28 failed.
What I see is that you used the VS2017 solution. Recently I added build files for VS2019. However, I have to admit that I didn't thoroughly test the VS2019 builds yet. I will do that to verify that there is no issue with the build files coming with wxSQLite3, but this will take some time.
In the meantime you could rebuild the wxSQLite3 projects individually to find out, which fail and which not. You do that by selecting a configuration, then selecting one of the projects (you should start with project wxsqlite3), and then selecting Rebuild wxsqlite3.
Additionally, please check which subfolders exist in the lib folder of wxSQLite3, and how the .lib files therein are named. And please report back here.
I tested the VS2019 build files of the latest wxSQLite3 version and had no issues. That is, in principle the wxSQLite3 build files should work right out of the box. However, modifications to wx_setup.props
may be necessary to match your installation.
thanks for the hint. it will help me to see where this can be fixed from
I editted this part
Glad to hear that you were able to solve your build problems.
How do I build with Visual Studio 2019 (v142) so that I can stop getting this kind of an error.
D:\cpp\wxWidgets-3.1.2\include\msvc\wx\setup.h(125,10): error C1083: Cannot open include file: '../../../lib/vc141_x64_dll/mswud/wx/setup.h': No such file or directory treeviewapp.cpp
Am using wxWidgtes 3.1.2