[Qt-interest] How to use a shared library with QMake/QtCreator under Linux?
Abdelrazak Younes
younes.abdel at gmail.com
Wed Mar 11 15:44:55 CET 2009
Abdelrazak Younes wrote:
> Abdelrazak Younes wrote:
>> Hello,
>>
>> I created a shared library and an application with qtcreator. The
>> application correctly build and link with my library. So far so good.
>> Problem is that, unless I run ldconfig on the location of the
>> library, the application won't start.
>>
>> Under Windows I simply have to copy the dll in the same directory as
>> in the executable, or just put it in the path.
>>
>> Is there a way to put some post-compilation hook in the qmake project
>> of the library so that ldconfig is run automatically?
>
> Hum sorry to answer my own question but one trick would be to set the
> LD_LIBRARY_PATH before launching the executable. Unfortunately, I
> can't find where the executable name is set within QtCreator; anybody
> knows?
>
> My goal would be to let QtCreator launch
> LD_LIBRARY_PATH=../my_lib_path/:$LD_LIBRARY_PATH ./my_app
OK, I managed to add this variable in the "Projects->Build Environment"
dialog.
Sorry for the noise. Hope this will help someone else at least :-)
Abdel.
More information about the Qt-interest-old
mailing list