[Qt-interest] how to disable the "lib"

Francesc Vila francesc.vila at imb-cnm.csic.es
Tue Aug 2 14:38:36 CEST 2011


On Tue Aug  2 14:10:43 2011, Konstantin Tokarev wrote:
> 02.08.2011, 15:48, "Francesc Vila"<francesc.vila at imb-cnm.csic.es>:
>> In fact, in linux, all libraries start with the prefix lib. And then,
>> to link against it you use the switch -ltest (without the lib part). I
>> don't know if you can rename it, but I think that the linker expects it
>> that way. Is there any reason for this change of default behavior?
> 
> E.g. if you have plugin (Qt-style or not) which is always loaded with dlopen()
> and should never be linked using -l syntax.

True. I haven't thought about that. Anyway, Qt plugins have the prefix 
"lib" on linux and OSX. And if the application has to be cross-platform 
(at least windows and linux), when in the same place that the 
distinction between dlopen and LoadLibrary is made, the prefix can be 
appended.



More information about the Qt-interest-old mailing list