Hi Nick,

I am little confused by your suggestion,
how will  I specify the file extension .o for each object file.

my present script is as follows :

C:\STOIC\DEVELOPMENT\BIN\nasm  -f  aout  .\asm\KERNEL.asm    -o 
C:\STOIC\DEVELOPMENT\OUTPUT\KERNEL.o
C:\STOIC\DEVELOPMENT\BIN\nasm  -f  aout  .\asm\IntDefs.asm   -o 
C:\STOIC\DEVELOPMENT\OUTPUT\IntDefs.o

gcc  -c  ckernel.c  -o  ../../OUTPUT\CKernel.o   -I.\include 
gcc  -c  common.c   -o  ../../OUTPUT\Common.o    -I.\include  
gcc  -c  IDT.c      -o  ../../OUTPUT\IDT.o       -I.\include 
gcc  -c  isr.c      -o  ../../OUTPUT\isr.o       -I.\include 
gcc  -c  stdio.c    -o  ../../OUTPUT\std.o       -I.\include 
gcc  -c  GUI.c      -o  ../../OUTPUT\GUI.o       -I.\include 
gcc  -c  Graphics.c -o  ../../OUTPUT\Graphics.o  -I.\include 
gcc  -c  Timer.c    -o  ../../OUTPUT\Timer.o    -I.\include 
gcc  -c  keyboard.c -o  ../../OUTPUT\keyboard.o  -I.\include 
gcc  -c  KrnlHeap.c -o  ../../OUTPUT\KrnlHeap.o  -I.\include 
gcc  -c  Paging.c   -o  ../../OUTPUT\Paging.o    -I.\include 
pause


Can u suggest the enhancements now.

Thanks a lot for your prompt responses.


Regards,
navi





----- Original Message -----
From: Nick Clifton <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: bug-binutils@gnu.org
Sent: Tue, 22 Jul 2008 17:03:43 +0530 (IST)
Subject: Re: linker problem ? help needed !!!

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