g++

bjorn rohde jensen shamus@tdcadsl.dk
Sat Apr 6 13:38:00 GMT 2002


Hi Gregor,

 The -L option is for specifying extra directories with
libraries during linking. You probably also want to
specify a number of libraries to link agains using the
-l option. Have a look at the man pages on gcc.

Yours sincerely,

Bjorn

Gregor Karzelek wrote:
> 
> Hi Guys,
> ok, here comes my real problem:
> 
> I'm just trying to walk trough the QT-Tutorial and there I have to compile
> more than one file into a binary.
> 
> The commands I have to use is:
> $ g++ -L/foo/ -I/bar/ -c file1.cpp
> $ g++ -L/foo/ -I/bar/ -c file2.cpp
> and at last:
> $ g++ -o endfile file1.o file2.o
> 
> Or have I forgott something?
> Because the first to commands he do properly but when I want to compile the
> real binary he tells that nearly the whole X.o is wrong.
> Should I add a token or what could it be?
> 
> Greetings
> Gregor
> 
> PS:
> Yes, you're right, I have just started to program
> PPS:
>  I will send the error the g++ give out soon to this list.



More information about the Gcc-help mailing list