Unecessary symbol resolution..

Hi all,
I have written a simple test program to test if symbols which are not needed to build my executable are also resolved or are left unresolved since they are not needed anyway.

test_redundant_conflict.C is

#include <iostream>
main()
{
std::cout << "Hi" << std::endl;
}


compile2.sh
SUNWspro/6.2/exec/SUNWspro/bin/CC test_redundant_conflict.C -L~/RodeoLib/dev/install/.exec/sun4.sunos.5.8/lib -lRodeoGui_suncc6-g

I am compiling test_redundant_conflict.C with compile2.sh .
Rest assured that paths of compiler and of library are correct. I have skipped the prefix part.
Now the compiler throws error of unresolved symbols found in the RodeoGUI library. But why does the compile anyway try to resolve symbols of this library, if this library is not needed at all to build the executable, since I am not using it in the main method.

Could someone please explain what the compiler is doing and more importantly why? Speedy response would be greatly appreciated!.

Thanks a tons!
Last edited on
I have written a simple test program to test if symbols which are not needed to build my executable are also resolved or are left unresolved since they are not needed anyway.

It would appear that you have your answer.

So, somebody correct me if I'm wrong but, it appears that there are symbols in the library that you are linking with that are unresolved. As in, that library probably also relies on some additional libraries with which you must also link.
Last edited on
Topic archived. No new replies allowed.