help-gplusplus
[Top][All Lists]
Advanced

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

Re: How to collapse the two g++ lines to one


From: Ulrich Eckhardt
Subject: Re: How to collapse the two g++ lines to one
Date: Sun, 21 Aug 2005 13:45:11 +0200
User-agent: KNode/0.8.2

Stephan Strauss wrote:
> How is it possible to collapse these two lines into one:
> 
> 
> g++ -Wall -I/usr/include -g -c -o accumaa.o accumaa.c
> 
> g++ -Wall -I/usr/include -L/usr/X11R6/lib -o accumaa -lX11 -lXi -lXmu
> -lglut -lGL -lGLU -lm accumaa.o

One thing first: you should put the libs that are linked to after the files
that link to them. Other than that, it isn't possible, except if you can
live without the file accumaa.o; in that case, try this:

g++ -Wall -o accumaa accumaa.c -lX11 -lglut -lGLU ..

BTW: it is customary to call C++ sources .cc, .cxx, .C or most often .cpp.

Uli

-- 
http://gcc.gnu.org/faq.html
http://parashift.com/c++-faq-lite/



reply via email to

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