This is the mail archive of the gcc@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: How do I link in more than one COFF file during the process of making an exe?


> I have a source file hello.cpp.  I also have two resource files: helloRc.rc 
> and helloRc2.rc.  When I compile hello.cpp using g++.exe and helloRc.rc and 
> helloRc2.rc using windres.exe I end up with
> the folling output files:  hello.o, helloRc.o(COFF file), and helloRc2.o(COFF 
> file). Now when I link these files together using the command line:
>          g++ -o hello.exe hello.o helloRc.o helloRc2.o
> helloRc2.o does not get linked in and I can't figure out why.  It seems as 
> though g++ will only accept one COFF file -- the first one listed.  My 
> question is: How do I link in more than one COFF file during the process of 
> making an executable?

GCC doesn't link files. GCC converts C/C++/etc source files into assembly
code, which is then converted to object files by GAS and linked via LD.

This problem sounds like you are using Cygwin, which is a Windows-specific
version of GCC. There is a specific mailing list dedicated to the Cygwin
tools, and you will probably get an answer here, since most of us here
don't use Windows.

Toshi



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