I am newcomer here, facing a wired problem with gcc (tdm version 4.7.1)
Code: Select all
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/4.7.1/lto-w
rapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../src/gcc-4.7.1/configure --build=x86_64-w64-mingw32 --enab
le-targets=all --enable-languages=c,c++,fortran,objc,obj-c++ --enable-libgomp --
enable-lto --enable-libstdcxx-debug --enable-version-specific-runtime-libs --ena
ble-fully-dynamic-string --with-gnu-ld --disable-werror --disable-nls --disable-
win32-registry --prefix=/mingw64tdm --with-local-prefix=/mingw64tdm --with-pkgve
rsion=tdm64-1 --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: win32
gcc version 4.7.1 (tdm64-1)
Code: Select all
-------------- Clean: Release gcc in prototype (compiler: GNU GCC Compiler)---------------
Cleaned "prototype - Release gcc"
-------------- Build: Release gcc in prototype (compiler: GNU GCC Compiler)---------------
g++.exe -Wall -pipe -mthreads -Wno-attributes -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -D_UNICODE -D__WXMSW__ -IC:\wxWidgets-2.9.4\include -IC:\wxWidgets-2.9.4\contrib\include -IC:\sqlite-amalgamation-3071602 -IC:\wxWidgets-2.9.4\lib\gcc_lib\mswu -IC:\wxsqlite3-3.0.3\include -IC:\wxWidgets-2.9.4\include -IC:\wxWidgets-2.9.4\lib\gcc_lib\mswu -c C:\Users\ma\Documents\projects\prototype\prototypeApp.cpp -o "obj\Release gcc\prototypeApp.o"
g++.exe -Wall -pipe -mthreads -Wno-attributes -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -D_UNICODE -D__WXMSW__ -IC:\wxWidgets-2.9.4\include -IC:\wxWidgets-2.9.4\contrib\include -IC:\sqlite-amalgamation-3071602 -IC:\wxWidgets-2.9.4\lib\gcc_lib\mswu -IC:\wxsqlite3-3.0.3\include -IC:\wxWidgets-2.9.4\include -IC:\wxWidgets-2.9.4\lib\gcc_lib\mswu -c C:\Users\ma\Documents\projects\prototype\prototypeMain.cpp -o "obj\Release gcc\prototypeMain.o"
C:\Users\ma\Documents\projects\prototype\prototypeMain.cpp: In member function 'void prototypeFrame::OnAbout(wxCommandEvent&)':
C:\Users\ma\Documents\projects\prototype\prototypeMain.cpp:104:21: warning: unused variable 'db' [-Wunused-variable]
windres.exe -IC:\wxWidgets-2.9.4\include -IC:\wxWidgets-2.9.4\lib\gcc_lib\mswu -IC:\wxWidgets-2.9.4\include -J rc -O coff -i C:\Users\ma\DOCUME~1\projects\PROTOT~1\resource.rc -o "obj\Release gcc\resource.res"
g++.exe -LC:\sqlite-amalgamation-3071602 -LC:\wxWidgets-2.9.4\lib\gcc_lib -LC:\wxsqlite3-3.0.3\lib\gcc_lib -LC:\wxWidgets-2.9.4\lib\gcc_lib -o "bin\Release gcc\prototype.exe" "obj\Release gcc\prototypeApp.o" "obj\Release gcc\prototypeMain.o" "obj\Release gcc\resource.res" -mthreads -lsqlite3 -lwxmsw29u_core -lwxbase29u -lwxpng -lwxjpeg -lwxtiff -lwxzlib -lwxregexu -lwxcode_msw29u_wxsqlite3 -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -mwindows
C:\wxsqlite3-3.0.3\lib\gcc_lib/libwxcode_msw29u_wxsqlite3.a(wxsqlite3_lib_wxsqlite3.o):wxsqlite3.cpp:(.text+0x167): undefined reference to `sqlite3_result_text'
C:\wxsqlite3-3.0.3\lib\gcc_lib/libwxcode_msw29u_wxsqlite3.a(wxsqlite3_lib_wxsqlite3.o):wxsqlite3.cpp:(.text+0x185): undefined reference to `sqlite3_free'
C:\wxsqlite3-3.0.3\lib\gcc_lib/libwxcode_msw29u_wxsqlite3.a(wxsqlite3_lib_wxsqlite3.o):wxsqlite3.cpp:(.text+0x195): undefined reference to `sqlite3_free'
C:\wxsqlite3-3.0.3\lib\gcc_lib/libwxcode_msw29u_wxsqlite3.a(wxsqlite3_lib_wxsqlite3.o):wxsqlite3.cpp:(.text+0x205): undefined reference to `sqlite3_free'
C:\wxsqlite3-3.0.3\lib\gcc_lib/libwxcode_msw29u_wxsqlite3.a(wxsqlite3_lib_wxsqlite3.o):wxsqlite3.cpp:(.text+0x215): undefined reference to `sqlite3_free'
C:\wxsqlite3-3.0.3\lib\gcc_lib/libwxcode_msw29u_wxsqlite3.a(wxsqlite3_lib_wxsqlite3.o):wxsqlite3.cpp:(.text+0x25e): undefined reference to `sqlite3_malloc'
C:\wxsqlite3-3.0.3\lib\gcc_lib/libwxcode_msw29u_wxsqlite3.a(wxsqlite3_lib_wxsqlite3.o):wxsqlite3.cpp:(.text+0x29e): undefined reference to `sqlite3_malloc'
...
Code: Select all
wxSQLite3Database* db = new wxSQLite3Database();
The strange thing is, using similar settings and code with vc10 compiler, it can finish the compile and generate exe file. And both compiler (tdm-gcc and vc10 both 64bit) can compile and link the wxsqlite3 lib with its sample and the sample gives same output, I believe.
Any one can help?
Thank you.