[odb-users] RE: Building "hello" example on linux
Szumowski, Thomas
thomas.szumowski at lmco.com
Mon Aug 29 11:52:10 EDT 2011
Please disregard again. I asked too soon and figured it out right after. :)
As a reference for others:
I was running the make in the examples directory in a different console window than the one in the hello directory. The one in the hello directory didn't have the right library path. I fixed with:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
And I made it permanent by putting the line in /home/user/.bash_profile.
From: Szumowski, Thomas
Sent: Monday, August 29, 2011 11:45 AM
To: 'odb-users at codesynthesis.com'
Subject: Building "hello" example on linux
This is my first attempt at using ODB in linux vs windows.
I was able to build all the examples (with sqlite as the selected database) from the top examples directory using 'make'. No errors occurred. But if I go into the "hello" directory and type make, I get the following errors. Any idea why this is occurring? I ask because I get the same error when I try to manually go through the walkthrough in the user guide.
-----------------------------------------------------
make all-am
make[1]: Entering directory `/home/bladeuser/temp/odb-examples-1.6.0.a1/hello'
depbase=`echo driver.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I'.' -I'.' -DDATABASE_SQLITE -g -O2 -MT driver.o -MD -MP -MF $depbase.Tpo -c -o driver.o driver.cxx &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo person-odb.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I'.' -I'.' -DDATABASE_SQLITE -g -O2 -MT person-odb.o -MD -MP -MF $depbase.Tpo -c -o person-odb.o person-odb.cxx &&\
mv -f $depbase.Tpo $depbase.Po
/bin/sh ../libtool --tag=CXX --mode=link g++ -g -O2 -o driver driver.o person-odb.o -lodb-sqlite -lodb -lpthread
libtool: link: g++ -g -O2 -o driver driver.o person-odb.o -lodb-sqlite -lodb -lpthread
/usr/local/lib/libodb-sqlite.so: undefined reference to `sqlite3_open_v2'
/usr/local/lib/libodb-sqlite.so: undefined reference to `sqlite3_extended_errcode'
/usr/local/lib/libodb-sqlite.so: undefined reference to `sqlite3_prepare_v2'
collect2: ld returned 1 exit status
make[1]: *** [driver] Error 1
-----------------------------------------------------
-Tom
More information about the odb-users
mailing list