RE: [xml] Generating a correct xml2-config for use with --libs



Good Morning, 

Let me be clear, you should only link your application with 
-lsocket if 
your application needs access to a member of libsocket. Otherwise you 
are creating a completely unneccessary dependancy on a 
library that your 
application doesn't directly depend on.

I was wondering... Why does Sun linker create that dependence?

The way you want to have it is the only way possible on Windows. I
cannot successfully compile a shared object without resolving all
dependences. But, my linker has a switch which makes it ignore all
libraries specified on the command line if the program being linked uses
no symbols from these libraries.

Isn't Sun's linker able to do the same, means create a dependence to
libsocket.so if and only if your program actually used something in
libsocket.so? Treat -lsocket merely as a hint for where to look for
symbols, not as an instruction to create a dependence in any case? Isn't
that possible?

Don't get me wrong, I am not taking sides here. We don't use the same
makefile, so I am neutral on the topic. I am just surprised about Sun's
compiler package.

Ciao
Igor



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]