wxSqlite3 Version 3-3.3.1 can not compile Please help

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
AKG
Earned a small fee
Earned a small fee
Posts: 14
Joined: Wed Aug 17, 2016 2:49 pm

wxSqlite3 Version 3-3.3.1 can not compile Please help

Postby AKG » Wed Aug 17, 2016 2:58 pm

I have Windows 10, and compiled wxWidgets-3.1.0 without problems. I got Codeblocs to work with this version by changing the project script.
I then tried to compile wxSqlite3 - but after 3 days trying all kinds of things, reading all i can there is just no solution, so I hope someone here can help me get this to work.

I have the following included in path: .... C:\CodeBlocks\MinGW\bin;C:\wxWidgets-3.1.0;C:\wxsqlite3-3.3.1; .... and also the WXWIN pointing to C:\wxWidgets-3.1.0 in user variables under windows.

The output from trying to install it varies, the last thing i tried resulted in the result below:

c:\wxsqlite3-3.3.1\build>mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=0 UNICODE=0
if not exist ..\lib\gcc_lib mkdir ..\lib\gcc_lib
g++ -shared -fPIC -o ..\lib\gcc_lib\wxcode_msw30ud_wxsqlite3.dll gccmswud_dll\wxsqlite3_dll_wxsqlite3.o -mthreads -LC:\wxWidgets-3.1.0\lib\gcc_lib -g -L..\lib\gcc_lib -Wl,--out-implib=..\lib\gcc_lib\libwxcode_msw30ud_wxsqlite3.a -L..\sqlite3\lib -lsqlite3 -lwxmsw30ud_core -lwxbase30ud -lwxtiffd -lwxjpegd -lwxpngd -lwxzlibd -lwxregexud -lwxexpatd -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32
C:/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/4.9.2/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw30ud_core
C:/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/4.9.2/../../../../mingw32/bin/ld.exe: cannot find -lwxbase30ud
collect2.exe: error: ld returned 1 exit status
makefile.gcc:280: recipe for target '..\lib\gcc_lib\wxcode_msw30ud_wxsqlite3.dll' failed
mingw32-make: *** [..\lib\gcc_lib\wxcode_msw30ud_wxsqlite3.dll] Error 1

catalin
Moderator
Moderator
Posts: 1369
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: wxSqlite3 Version 3-3.3.1 can not compile Please help

Postby catalin » Wed Aug 17, 2016 3:47 pm

wxSqlite3 still needs wxW 3.0. You can see that from the libs it is trying to link with, i.e. -lwxbase30ud
You can either download the latest wxW 3.0.x version and use it to build wxSqlite3 or modify the makefile and replace 30 with 31 in the lib names in order to build using wxW 3.1.

AKG
Earned a small fee
Earned a small fee
Posts: 14
Joined: Wed Aug 17, 2016 2:49 pm

Re: wxSqlite3 Version 3-3.3.1 can not compile Please help

Postby AKG » Wed Aug 17, 2016 5:04 pm

Yeah, I changed the setting in the make file, so it uses 31, now.
Now i get this:

if not exist ..\lib\gcc_lib mkdir ..\lib\gcc_lib
g++ -c -o gccmswud\wxsqlite3_lib_wxsqlite3.o -DHAVE_W32API_H -D_UNICODE -D__WXDEBUG__ -D__WXMSW__ -IC:\wxWidgets-3.1.0\lib\gcc_lib\mswud -IC:\wxWidgets-3.1.0\include -O0 -g -W -Wall -I..\include -DwxUSE_DYNAMIC_SQLITE3_LOAD=0 -DWXSQLITE3_HAVE_METADATA=0 -DWXSQLITE3_HAVE_CODEC=0 -DWXSQLITE3_HAVE_LOAD_EXTENSION=0 -I..\sqlite3\include -MTgccmswud\wxsqlite3_lib_wxsqlite3.o -MFgccmswud\wxsqlite3_lib_wxsqlite3.o.d -MD -MP ../src/wxsqlite3.cpp
../src/wxsqlite3.cpp: In member function 'void wxSQLite3Database::SetCollation(const wxString&, wxSQLite3Collation*)':
../src/wxsqlite3.cpp:3705:7: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
int rc;
^
if exist ..\lib\gcc_lib\libwxcode_msw31ud_wxsqlite3.a del ..\lib\gcc_lib\libwxcode_msw31ud_wxsqlite3.a
ar rcu ..\lib\gcc_lib\libwxcode_msw31ud_wxsqlite3.a gccmswud\wxsqlite3_lib_wxsqlite3.o
ranlib ..\lib\gcc_lib\libwxcode_msw31ud_wxsqlite3.a
g++ -c -o gccmswud\minimal_minimal.o -DHAVE_W32API_H -D_UNICODE -D__WXDEBUG__ -D__WXMSW__ -IC:\wxWidgets-3.1.0\lib\gcc_lib\mswud -IC:\wxWidgets-3.1.0\include -O0 -g -W -Wall -I..\include -I..\samples -I..\sqlite3\include -MTgccmswud\minimal_minimal.o -MFgccmswud\minimal_minimal.o.d -MD -MP ../samples/minimal.cpp
../samples/minimal.cpp: In member function 'virtual int Minimal::OnRun()':
../samples/minimal.cpp:623:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < sizeof bin; i++)
^
../samples/minimal.cpp:643:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < sizeof bin; i++)
^
windres --use-temp-file -i../samples/minimal.rc -ogccmswud\minimal_minimal_rc.o --define HAVE_W32API_H --define _UNICODE --define __WXDEBUG__ --define __WXMSW__ --include-dir C:\wxWidgets-3.1.0\lib\gcc_lib\mswud --include-dir C:\wxWidgets-3.1.0/include --include-dir ../include --include-dir ../samples --include-dir ..\sqlite3\include
g++ -o ..\samples\minimal.exe gccmswud\minimal_minimal.o gccmswud\minimal_minimal_rc.o -mthreads -LC:\wxWidgets-3.1.0\lib\gcc_lib -g -L..\lib\gcc_lib -L..\sqlite3\lib ..\lib\gcc_lib\libwxcode_msw31ud_wxsqlite3.a -lsqlite3 -lwxmsw31ud_core -lwxbase31ud -lwxtiffd -lwxjpegd -lwxpngd -lwxzlibd -lwxregexud -lwxexpatd -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32
C:\wxWidgets-3.1.0\lib\gcc_lib/libwxmsw31ud_core.a(corelib_utilsgui.o): In function `Z28wxEnableFileNameAutoCompleteP6HWND__':
c:\wxWidgets-3.1.0\build\msw/../../src/msw/utilsgui.cpp:268: undefined reference to `_imp__SHAutoComplete@8'
C:\wxWidgets-3.1.0\lib\gcc_lib/libwxmsw31ud_core.a(corelib_textentry.o): In function `ZN11wxTextEntry23DoAutoCompleteFileNamesEi':
c:\wxWidgets-3.1.0\build\msw/../../src/msw/textentry.cpp:792: undefined reference to `_imp__SHAutoComplete@8'
C:\wxWidgets-3.1.0\lib\gcc_lib/libwxbase31ud.a(baselib_dlmsw.o): In function `GetFileVersion':
c:\wxWidgets-3.1.0\build\msw/../../src/msw/dlmsw.cpp:65: undefined reference to `GetFileVersionInfoSizeW@8'
c:\wxWidgets-3.1.0\build\msw/../../src/msw/dlmsw.cpp:69: undefined reference to `GetFileVersionInfoW@16'
c:\wxWidgets-3.1.0\build\msw/../../src/msw/dlmsw.cpp:76: undefined reference to `VerQueryValueW@16'
C:\wxWidgets-3.1.0\lib\gcc_lib/libwxbase31ud.a(baselib_mimetype.o): In function `wxAssocQueryString':
c:\wxWidgets-3.1.0\build\msw/../../src/msw/mimetype.cpp:276: undefined reference to `_imp__AssocQueryStringW@24'
collect2.exe: error: ld returned 1 exit status
makefile.gcc:287: recipe for target '..\samples\minimal.exe' failed
mingw32-make: *** [..\samples\minimal.exe] Error 1

PB
wxWorld Domination!
wxWorld Domination!
Posts: 1160
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxSqlite3 Version 3-3.3.1 can not compile Please help

Postby PB » Wed Aug 17, 2016 6:21 pm

I believe the linker errors are there because you miss some standard windows libraries. Add "shlwapi" and "version" libraries to "Link libraries" in Project build options / Linker settings. If you are using a GCC makefile you need to add these two libraries there: Append " -lshlwapi -lversion" to the lines starting with "-luuid".

AFAIK these were not needed in wxWidgets 3.0 but they have been required for wxWidgets projects since wxWidgets 3.1 (see https://github.com/wxWidgets/wxWidgets/commit/e78be14ac185508bfff4a8e515c2efe80629603d).

AKG
Earned a small fee
Earned a small fee
Posts: 14
Joined: Wed Aug 17, 2016 2:49 pm

Re: wxSqlite3 Version 3-3.3.1 can not compile Please help

Postby AKG » Wed Aug 17, 2016 6:57 pm

I deleted everything and started over, newer version of everything, and now i get this:

c:\wxsqlite3-3.3.1\build>mingw32-make -f makefile.gcc
if not exist ..\lib\gcc_lib mkdir ..\lib\gcc_lib
g++ -c -o gccmswud\wxsqlite3_lib_wxsqlite3.o -DHAVE_W32API_H -D_UNICODE -D__WXDEBUG__ -D__WXMSW__ -IC:\wxWidgets-3.1.0\lib\gcc_lib\mswud -IC:\wxWidgets-3.1.0\include -O0 -g -W -Wall -I..\include -DwxUSE_DYNAMIC_SQLITE3_LOAD=0 -DWXSQLITE3_HAVE_METADATA=0 -DWXSQLITE3_HAVE_CODEC=0 -DWXSQLITE3_HAVE_LOAD_EXTENSION=0 -I..\sqlite3\include -MTgccmswud\wxsqlite3_lib_wxsqlite3.o -MFgccmswud\wxsqlite3_lib_wxsqlite3.o.d -MD -MP ../src/wxsqlite3.cpp
../src/wxsqlite3.cpp: In member function 'void wxSQLite3Database::SetCollation(const wxString&, wxSQLite3Collation*)':
../src/wxsqlite3.cpp:3705:7: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
int rc;
^
if exist ..\lib\gcc_lib\libwxcode_msw31ud_wxsqlite3.a del ..\lib\gcc_lib\libwxcode_msw31ud_wxsqlite3.a
ar rcu ..\lib\gcc_lib\libwxcode_msw31ud_wxsqlite3.a gccmswud\wxsqlite3_lib_wxsqlite3.o
ranlib ..\lib\gcc_lib\libwxcode_msw31ud_wxsqlite3.a
g++ -c -o gccmswud\minimal_minimal.o -DHAVE_W32API_H -D_UNICODE -D__WXDEBUG__ -D__WXMSW__ -IC:\wxWidgets-3.1.0\lib\gcc_lib\mswud -IC:\wxWidgets-3.1.0\include -O0 -g -W -Wall -I..\include -I..\samples -I..\sqlite3\include -MTgccmswud\minimal_minimal.o -MFgccmswud\minimal_minimal.o.d -MD -MP ../samples/minimal.cpp
../samples/minimal.cpp: In member function 'virtual int Minimal::OnRun()':
../samples/minimal.cpp:623:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < sizeof bin; i++)
^
../samples/minimal.cpp:643:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < sizeof bin; i++)
^
windres --use-temp-file -i../samples/minimal.rc -ogccmswud\minimal_minimal_rc.o --define HAVE_W32API_H --define _UNICODE --define __WXDEBUG__ --define __WXMSW__ --include-dir C:\wxWidgets-3.1.0\lib\gcc_lib\mswud --include-dir C:\wxWidgets-3.1.0/include --include-dir ../include --include-dir ../samples --include-dir ..\sqlite3\include
g++ -o ..\samples\minimal.exe gccmswud\minimal_minimal.o gccmswud\minimal_minimal_rc.o -mthreads -LC:\wxWidgets-3.1.0\lib\gcc_lib -g -L..\lib\gcc_lib -L..\sqlite3\lib ..\lib\gcc_lib\libwxcode_msw31ud_wxsqlite3.a -lsqlite3 -lwxmsw31ud_core -lwxbase31ud -lwxtiffd -lwxjpegd -lwxpngd -lwxzlibd -lwxregexud -lwxexpatd -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32
C:\wxWidgets-3.1.0\lib\gcc_lib/libwxmsw31ud_core.a(corelib_utilsgui.o): In function `Z28wxEnableFileNameAutoCompleteP6HWND__':
c:\wxWidgets-3.1.0\build\msw/../../src/msw/utilsgui.cpp:268: undefined reference to `_imp__SHAutoComplete@8'
C:\wxWidgets-3.1.0\lib\gcc_lib/libwxmsw31ud_core.a(corelib_textentry.o): In function `ZN11wxTextEntry23DoAutoCompleteFileNamesEi':
c:\wxWidgets-3.1.0\build\msw/../../src/msw/textentry.cpp:792: undefined reference to `_imp__SHAutoComplete@8'
C:\wxWidgets-3.1.0\lib\gcc_lib/libwxbase31ud.a(baselib_dlmsw.o): In function `GetFileVersion':
c:\wxWidgets-3.1.0\build\msw/../../src/msw/dlmsw.cpp:65: undefined reference to `GetFileVersionInfoSizeW@8'
c:\wxWidgets-3.1.0\build\msw/../../src/msw/dlmsw.cpp:69: undefined reference to `GetFileVersionInfoW@16'
c:\wxWidgets-3.1.0\build\msw/../../src/msw/dlmsw.cpp:76: undefined reference to `VerQueryValueW@16'
C:\wxWidgets-3.1.0\lib\gcc_lib/libwxbase31ud.a(baselib_mimetype.o): In function `wxAssocQueryString':
c:\wxWidgets-3.1.0\build\msw/../../src/msw/mimetype.cpp:276: undefined reference to `_imp__AssocQueryStringW@24'
collect2.exe: error: ld returned 1 exit status
makefile.gcc:287: recipe for target '..\samples\minimal.exe' failed
mingw32-make: *** [..\samples\minimal.exe] Error 1

This is really starting to drive me crazy, 4 days i have tried to do something that is supposed to be a very simple thing.
Please help !??

AKG
Earned a small fee
Earned a small fee
Posts: 14
Joined: Wed Aug 17, 2016 2:49 pm

Re: wxSqlite3 Version 3-3.3.1 can not compile Please help

Postby AKG » Wed Aug 17, 2016 7:03 pm

I Am running Windows 64 bit and Windows 10, if it is easier to start over, just give me the steps from start, and the versions that work together. Version of wxWidgets, wxSqlite so that I can compile code that is compatible.

Thank you so much,

====================================================
Sorry, getting sloppy after recompiling so many times, I did not add it properly to all lines, and now that I dis it all over - it finally compiled.

Thank you very much


Return to “wxCode”

Who is online

Users browsing this forum: Google [Bot] and 1 guest