Mysterious linker errors

closed account (yRX36Up4)
Hi everybody,

I'm having some trouble with my small utility library I'm writing on for quite some time. For the last few days I get mysterious linker errors when I try to link an application against it (using MSVS 10.0). It"s a static library and linked against glut32.lib (v3.7.6) and DevIL.lib (v1.7.8). I don't remember changing something in the compiler or linker settings recently, just added some classes, templates and functions, now I'm getting unresolved symbols all the time when I try to link against the lib. What I don't understand at all is, that these unresolved symbols are not actually used by my application but by a class within this library. My application instantiates and uses this class.

To clarify this some more: there is a function ns1::ns2::foo(). Then there is this class ns1::ns2::SomeClass in the file SomeFile.h. SomeClass uses foo() in a method. The library containing both of them builds without any problem. If I try to use SomeClass within an application however, I get a linker error saying foo is an unresolved external symbol within SomeFile.h.

This does not make sense to me. Seems like there is some delayed linking or whatever, never heared of something like that.

Does anybody have an idea what could cause this problem? Please help!

Thanks!
Have you included all header, that you need?
Have you checked the Additional dependences of your Linker propeties?


Regards
closed account (yRX36Up4)
Thanks for your reply, garrido.

@headers: yes, I have. I think it would not compile if a header would be missing. Besides, to my understanding the *library* would already fail to build in this case, not the *application*. Maybe I'm wrong and there would be an explaination for the library to build and the error to turn out later on?

@linker: checked for what exactly? All the paths and files are set correctly if that's what you mean.

Best regards
Topic archived. No new replies allowed.