This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc compile options


On Jul  5, 2001, Carla Nunes <carlanunes@yahoo.com> wrote:

> compile:
> gcc -x c++ -g -Iincdir -c srcdir/*.c objdir/*.o -mthreads

Use g++ instead of gcc -x c++.

Note that it doesn't make sense to list object files when you use -c:
only source files can be listed.  In this case, you can use -o to
specify the output object file name, but then, you can only specify
one source file per compilation.

> gcc -lsomelib -o execfile objfiles

Always list libraries after object files they depend on.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]