By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,852 Members | 2,219 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,852 IT Pros & Developers. It's quick & easy.

Using g++ as a linker

P: n/a
Hi !
I'm trying to compile a project using a generic rule that compiles a .cpp to
a .o . To get the resulting program, I try to do the following:
g++ obj1.o obj2.o obj3.o -o program

But it seems that the dependency between the .o cannot be resolved: I get
"undefined reference" errors.

I've read the FAQs, but all the linker error are linked with "virtual" or
mixing C/C++.

If you have any advice, please tell me. Don't hesitate to give me links to
other project doing similar things.

Thanks.

Julien
Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Fugitif wrote:

I'm trying to compile a project using a generic rule that compiles a .cpp to
a .o . To get the resulting program, I try to do the following:
g++ obj1.o obj2.o obj3.o -o program

But it seems that the dependency between the .o cannot be resolved: I get
"undefined reference" errors.

I've read the FAQs, but all the linker error are linked with "virtual" or
mixing C/C++.

If you have any advice, please tell me. Don't hesitate to give me links to
other project doing similar things.


Hi Julien,

We would be happy to answer this question
if you would just post it to the gnu.g++.help newsgroup.

Jul 22 '05 #2

P: n/a

"Fugitif" <fugitif(@)altern.org> wrote in message news:3f***********************@news.free.fr...

I've read the FAQs, but all the linker error are linked with "virtual" or
mixing C/C++.


Not enough information, can you create a very small program that demonstrates the
problem. Most likely you haven't consistantly declared the "C" linkage etc...
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.