[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: library inclusion problem
From: |
Paul Pluzhnikov |
Subject: |
Re: library inclusion problem |
Date: |
Wed, 05 Jul 2006 20:46:54 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux) |
"Pindare" <pindare_poet@yahoo.co.uk> writes:
> 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
The "silly error" is there, but this:
> g++ -c prog.cc
> g++ -o xprog prog.o -I/home/pindare/othercode/
> -L/home/pindare/othercode/ -lmycode -lm
Isn't correct fix for it (though it obviously worked).
The correct solution is to understand options you are using, and
use them properly. If you are compiling in /home/pindare/mycode,
then correct command line is:
g++ -I../othercode -L../othercode -o xprog prog.cc -lmycode -lm
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.