[odb-users] odb::sqlite::database lining error
Boris Kolpackov
boris at codesynthesis.com
Sun Dec 9 05:36:08 EST 2012
Hi,
CanisMajorWuff <canismajorwuff at gmail.com> writes:
> ['d:\\mingw\\bin\\g++.exe', '-Wl,--enable-auto-import',
> '-Wl,--enable-auto-import', 'src\\Main.cpp.1.o', '-o', 'e
> :\\Documents\\documents\\C++Projects\\orm\\build\\src\\ormtest.exe',
> '-Wl,-Bstatic', '-LD:/odb/libodb/lib', '-LD:
> /odb/sqlite/lib', '-LD:/sqlite3', '-lsqlite3', '-lodb', '-lodb-sqlite',
> '-Wl,-Bdynamic']
>
> src\Main.cpp.1.o:Main.cpp:(.text.startup+0xe4): undefined reference to
> `__imp__ZN3odb6sqlite8databaseC1ERiPPcbibR
I believe what happens is you are linking to static libodb and
libodb-sqlite (the -Wl,-Bstatic option) while these libraries
were built as DLLs (the __imp__ prefix in the unresolved symbol
suggest that).
So you can try two things:
1. Remove the -Wl,-Bstatic and -Wl,-Bdynamic options.
2. Or, rebuild libodb and libodb-sqlite as static:
./configure --disable-shared
Boris
More information about the odb-users
mailing list