[Qt-interest] how to disable the "lib"
Rohan Prabhu
rohan at rohanprabhu.com
Wed Aug 3 11:04:25 CEST 2011
I have the exact same problem, and I want my libraries names without
any prefix at all (this is only for a very particular application I am
working on). And with qmake, I have not found out anyway to do it, so
I use a small hack there. So you have two options here, either switch
to something like cmake (not sure if cmake supports it or not, I'm
just assuming it does), or try a horribly ugly hack like this:
QMAKE_POST_LINK = mv libExampleAppOne.so.1.0.0 ExampleAppOne.so && rm lib*.so*
Basically, I let qmake do its thing, then rename the file myself and
delete the symlinks it creates.
NOTE: QMAKE_POST_LINK is not available on all platforms, and also, you
will have to take care of where your build directory is.
Regards,
rohan
On Wed, Aug 3, 2011 at 2:08 PM, Till Oliver Knoll
<till.oliver.knoll at gmail.com> wrote:
> 2011/8/2 tang ke <tangk at lemote.com>:
>> ...
>> TEMPLATE = lib
>> TARGET = test
>> ...
>> use the linux to compile, it will generate a file named
>> libtest.so.1.0.0, and two link file libtest.so.1, libtest.so
>>
>> how can I disable the "lib", and don't link the two file.
>
> Try using
>
> TEMPLATE = plugin
>
> Can't remember anymore whether it supresses the "lib" prefix, but it
> does prevent both the version number in the filename and the symbolic
> links.
>
> So you would get either "test.so" or maybe "libtest.so". Not sure what
> other side-effects "plugin" has though...
>
> Cheers, Oliver
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list