Hi Navi,

I want to compile multiple files C and C++ and link with gcc.
Is there any way.

Presumably you mean using the @<file> linker command line option to avoid having problems with excessively long command lines ? Then the answer is yes. Like this:

  gcc -c foo.c bar.cc

  echo foo.o bar.o > files.list

  gcc -Wl,@files.list -o myprog

I just picked "foo.c" and "bar.cc" as random source file names, but I hope that this makes the idea clear.

Cheers
  Nick



_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to