This is the mail archive of the gcc-help@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] |
| Other format: | [Raw text] | |
I am currently learning c++ and have run into a mildly annoying problem. When I use the sun compiler, everything compiles and links nicely. When I use g++ and the gnu linker, I just get undefined reference errors. Now, I have noticed that the sun compiler invokes it's linker with the -u and -R[object file] options, but I do not know how to have the gnu compiler "automagically" do this. More specifically, when I take this code to another machine, how do I have a makefile resolve these dependencies. Any help would be appreciated. I have included three files: gnucompile.txt [console output when I use g++] suncompile.txt [console output when I use the sun compiler] fixme.tar.gz [code I am trying to compile] program versions: gcc= 3.2.3 binutils= 2.13.2.1 Thank you for any advice/help anyone could give me. Greg Davey gbdavey@acsu.buffalo.edu I sent this e-mail to redhat and got the following reply. If anyone could help me with my problem I would greatly appreciate it. Thank you, Greg Davey Reply received from nickc@redhat.com >Hi Greg, > >> I am currently learning c++ and have run into a mildly annoying >> problem. When I use the sun compiler, everything compiles and >>links >> nicely. When I use g++ and the gnu linker, I just get undefined >> reference errors. > >This looks more like a g++ problem (1) than a linker problem. You >will probably be better off sending your query to the: > > gcc-help@gcc.gnu.org > >list. > >Cheers > Nick > >(1) with instantiation of templates.
Attachment:
fixme.tar.gz
Description: application/compressed-tar
Attachment:
gnucompile.txt
Description: Text document
Attachment:
suncompile.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |