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

CanisMajorWuff canismajorwuff at gmail.com
Sun Mar 24 18:35:27 EDT 2013


Hello,

I am trying to compile your 'Hello World' Example. And I am stuck with 
the following errror:

Waf: Entering directory 
`e:\Documents\documents\C++Projects\odb\build\release'
[1/3] cxx: src\driver.cxx -> build\release\src\driver.cxx.1.o
[2/3] cxx: src\person-odb.cxx -> build\release\src\person-odb.cxx.1.o
[3/3] cxxprogram: build\release\src\driver.cxx.1.o 
build\release\src\person-odb.cxx.1.o -> build\release\src\odb.e
xe
src\person-odb.cxx.1.o:person-odb.cxx:(.text+0x15e4): undefined 
reference to `odb::result_impl::result_impl(odb::c
onnection&)'
src\person-odb.cxx.1.o:person-odb.cxx:(.text+0x310e): undefined 
reference to `odb::result_impl::result_impl(odb::c
onnection&)'
d:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw32/bin/ld.exe: 
src\person-odb.cxx.1.o
: bad reloc address 0x0 in section `.data'
collect2.exe: error: ld returned 1 exit status
Waf: Leaving directory 
`e:\Documents\documents\C++Projects\odb\build\release'
Build failed
  -> task in 'odb' failed (exit status 1):
         {task 52254480L: cxxprogram driver.cxx.1.o,person-odb.cxx.1.o 
-> odb.exe}
['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']



Libraries were successfully compiled by this:

./configure --disable-shared --build=x86_64-w64-mingw32 
--prefix=/d/odb/libodb && make&& make install

./configure --disable-shared CPPFLAGS="-I/d/odb/lib/include 
-I/d/sqlite3/sqlite3/include" LDFLAGS="-L/d/odb/l

ib/lib -L/d/sqlite3/sqlite3/lib" --build=x86_64-w64-mingw32 
--prefix=/d/odb/lib-sqlite && make && make install


Thx.



More information about the odb-users mailing list