help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

linking multiple object files into a single object file output


From: FlorinBr
Subject: linking multiple object files into a single object file output
Date: 20 Apr 2007 10:59:28 -0700
User-agent: G2/1.0

Hello!
I wonder if you can do the following: I have some object files
resulted aflter g++ compilation of source files, let's say something
like this:

file1.o : file1.cpp
file2.o : file2.cpp
file3.o : file3.cpp

and I would like to "link" file1.o , file2.o , and file3.o into a big
object file, let's say file.o, but which shouldn't be an executable -
I want it to be just an object file, which is to be used in a
later(final) linking stage.

Can this be done? Which are the options to be passed to g++ ? I
skimmed the manual and I couldn't find anything in the "Controlling
the kind of output" section. Maybe I'm not looking where I should?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]