LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   g++ can't find libraries that are in /usr/lib (http://www.linuxquestions.org/questions/linux-software-2/g-cant-find-libraries-that-are-in-usr-lib-135761/)

williamtbranch 01-17-2004 01:11 PM

g++ can't find libraries that are in /usr/lib
 
I'm trying to build a very small program that needs to reference some libraries at compile time. It's telling me that the libraries don't exist. They do exist. I've spent 30 hours or so installing all of them. I have the latest stable version of gcc.

I would greatly appreciate any help.
Thank you.

linux:/home/bill/supermemox-0.0.1/src # make
gcc -Wall -I. -o supermemox KnowledgeOrganizer.o KnowledgeCollection.o KnowledgeNugget.o LearningAlgorithm.o TestResult.o XmlSerializable.o XmlParser.o TextUI.o main.o -l expat -l boost_date_time -l nana -l stdc++
gcc: expat: No such file or directory
gcc: boost_date_time: No such file or directory
gcc: nana: No such file or directory
gcc: stdc++: No such file or directory
make: *** [supermemox] Error 1

Bill Branch williamtbranch@msn.com

jtshaw 01-17-2004 01:17 PM

Read the gcc/g++ manpage. You are not using the command correctly.

-I. is not neccesary.

Here is an example of me compiling a program with two cpp files in it and the expat library linked in:
g++ -Wall -lexpat -o foo foo.cpp bar.cpp

williamtbranch 01-17-2004 01:28 PM

Thank you jtshaw,
That did the job

Regards,
Bill


All times are GMT -5. The time now is 03:46 AM.