help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: library inclusion problem


From: Pindare
Subject: Re: library inclusion problem
Date: 5 Jul 2006 04:41:41 -0700
User-agent: G2/0.2

Pindare wrote:

>   7. then I type
> g++ -I../home/pindare/othercode/ -L../home/pindare/othercode/ -o xprog
> prog.cc -lmycode -lm

I found the silly error at last, should type instead

g++ -c prog.cc

then reverse order of arguments (correct one seems to be:
files first, libdirs second, libs last)

g++ -o xprog prog.o -I/home/pindare/othercode/
-L/home/pindare/othercode/
-lmycode -lm 

Sorry for the confusion.
  
Regards, 
 --- 
PP



reply via email to

[Prev in Thread] Current Thread [Next in Thread]