[odb-users] helloworld: undefined reference to `odb::result_impl

Boris Kolpackov boris at codesynthesis.com
Mon Mar 25 07:47:43 EDT 2013


Hi,

CanisMajorWuff <canismajorwuff at gmail.com> writes:

> ['d:\\mingw\\bin\\g++.exe', '-Wl,--enable-auto-import',  
> 'src\\driver.cxx.1.o', 'src\\person-odb.cxx.1.o', '-o', 'e
> :\\Documents\\documents\\C++Projects\\odb\\build\\release\\src\\odb.exe', 
> '-Wl,-Bstatic', '-LD:/mingw/lib', '-LD:/
> odb/lib/lib', '-LD:/odb/lib-sqlite/lib', '-lodb-sqlite', '-lodb',  
> '-Wl,-Bdynamic']

Hm, I see you are trying to link the ODB runtimes statically but
the error suggests that the symbols are still being resolves as
DLL-imported. This would normally indicate that your compilation
picks up libodb/libodb-sqlite headers that were configured as DLL.
Do you have -I/d/odb/lib-odb/include -I/d/odb/lib-sqlite/include
in your C++ compiler command line?

Some things that you may want to try:

1. Remove the --enable-auto-import option and see what happens.

2. Try to compile and link the test executable manually by running
   g++ directly with appropriate options.

Boris



More information about the odb-users mailing list