dbTalk Databases Forums  

/usr/bin/ld: cannot find -ldb_cxx

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss /usr/bin/ld: cannot find -ldb_cxx in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default /usr/bin/ld: cannot find -ldb_cxx - 06-22-2006 , 03:17 AM






Hi, I'm new (to this group, linux, and bdb), and I encountered this
error below when doing a 'make' (to PRIX s/w, if ever heard of).

[nico@199-47 src]$ make
g++ -g -c prix_construct_sequences.cc -I. -I/home/nico/prix/h
-I/home/nico/bdb/include
g++ -g -o prix_construct_sequences prix_construct_sequences.o
-I/home/nico/prix/h
g++ -g -c prix_indexer.cc -I. -I/home/nico/prix/h
-I/home/nico/bdb/include
g++ -g -c helper.cc -I. -I/home/nico/prix/h
-I/home/nico/bdb/include
g++ -g -c subsequence.cc -I. -I/home/nico/prix/h
-I/home/nico/bdb/include
g++ -g -c post_process.cc -I. -I/home/nico/prix/h
-I/home/nico/bdb/include
g++ -g -o prix_indexer prix_indexer.o helper.o subsequence.o
post_process.o -I/home/nico/prix/h -L/home/nico/bdb/lib
-I/home/nico/bdb/include -lm -lstdc++ -ldb -ldb_cxx -lpthread
/usr/bin/ld: cannot find -ldb_cxx
collect2: ld returned 1 exit status
make: *** [indexer] Error 1

Anyone know what does that mean? The author of PRIX says that I didn't
install BDB with C++ support, but even after I uninstalled &
reconfigured BDB with "../dist/configure --enable-cxx", I still
encountered the same problem.

I am running a Fedora Core 2.6.12-1.1381_FC3 Linux, BerkeleyDB 4.4.20,
and gcc 3.4.4.

Thanks very much,

Nico (nico at nus dot edu dot sg)


Reply With Quote
  #2  
Old   
Ron
 
Posts: n/a

Default Re: /usr/bin/ld: cannot find -ldb_cxx - 06-22-2006 , 08:37 AM






-L/usr/local/BerkeleyDB4.4 -ldb_cxx-4.4
tnicxx (AT) gmail (DOT) com wrote:
Quote:
Hi, I'm new (to this group, linux, and bdb), and I encountered this
error below when doing a 'make' (to PRIX s/w, if ever heard of).

[nico@199-47 src]$ make
g++ -g -c prix_construct_sequences.cc -I. -I/home/nico/prix/h
-I/home/nico/bdb/include
g++ -g -o prix_construct_sequences prix_construct_sequences.o
-I/home/nico/prix/h
g++ -g -c prix_indexer.cc -I. -I/home/nico/prix/h
-I/home/nico/bdb/include
g++ -g -c helper.cc -I. -I/home/nico/prix/h
-I/home/nico/bdb/include
g++ -g -c subsequence.cc -I. -I/home/nico/prix/h
-I/home/nico/bdb/include
g++ -g -c post_process.cc -I. -I/home/nico/prix/h
-I/home/nico/bdb/include
g++ -g -o prix_indexer prix_indexer.o helper.o subsequence.o
post_process.o -I/home/nico/prix/h -L/home/nico/bdb/lib
-I/home/nico/bdb/include -lm -lstdc++ -ldb -ldb_cxx -lpthread
/usr/bin/ld: cannot find -ldb_cxx
collect2: ld returned 1 exit status
make: *** [indexer] Error 1

Anyone know what does that mean? The author of PRIX says that I didn't
install BDB with C++ support, but even after I uninstalled &
reconfigured BDB with "../dist/configure --enable-cxx", I still
encountered the same problem.

Assuming you followed the build steps outlined in our documentation
there should be some console output that tells you where the Berkeley
DB libraries were installed.

So for example if you look in /usr/local/BerkeleyDB4.4/lib you will see
files of the type
libdb_cxx*. Those are the C++ libs and indicates you configured
Berkeley DB with C++ support.

Now you have to figure out in building your application how to tell the
linker where to find the Berkeley DB C++ library.

You may end up with something *similar* to the following for the -L
flag:
-L/usr/local/BerkeleyDB4.4 -ldb_cxx-4.4


To test for c++ support you can go to the build directory and type:
make excxx_access

That should confirm that you have C++ support built correctly also.

Hope this helps!

Ron



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.