Multiply defined symbols?
I have some static library libA.a that has symbols x & y defined. I'm building another static library libB.a which seems to also be defining symbols x & y. So when I try to build executable C while linking libA.a and libB.a, I get a multiply defined symbols error. But when I build libB.a linking libA.a, I don't get any errors. Shouldn't I get the same error when I try to build libB.a and link in libA.a?
edit: I always find the problem after I make a post. My make file had an error in it and wasn't linking things properly.
Re: Multiply defined symbols?
Building a library doesn't have a concept of linking, at least not in the same way that executables do.
Re: Multiply defined symbols?
Those symbols need to be in the #include that you use to interface with the library, not the library itself.
Re: Multiply defined symbols?
Linker errors have nothing to do with #includes.
Well, except that incorrect header file usage can cause them.
Re: Multiply defined symbols?
Oops, I misread the post.
Re: Multiply defined symbols?