Ulrich Eckhardt wrote:
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 ..

Well, not _quite_ true. One could cheat and use ';', or tell it to --keep-temps (which also gives you .ii and .s files as well).
BTW: it is customary to call C++ sources .cc, .cxx, .C or most often .cpp.

Uli

It tells the compiler what language it is, otherwise you should use
-x c++



_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to