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]

Re: Undefined reference to static member


I remember I have had trouble before with the order of object files and -l parameters, but in this case, I do not think it is causing me a problem. I am only compiling one source file.

Would anyone out there like to see the source? Would it be better if I just post it?

-Leo Przybylski

Ben Davis wrote:

On Tuesday 04 February 2003 7:45 pm, John Love-Jensen wrote:

Hi Leo,

It could be link order.

g++ -o myapp foo.o bar.o

If bar.o has dangling references that are satisfied in foo.o, they won't be
pulled in because the (single pass!) link order is reversed.

This can't be true... can it? I've NEVER had a problem with link order of .o files. In my experience, only the order of -l switches is important...

Ben







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