[Qt-interest] Static linking

JD Guzman lostinthecode at googlemail.com
Thu Jun 25 18:06:08 CEST 2009


Hello Srdjan,

I don't post here often but follow the list closely as many times issues 
that are addressed are of help to me later.

All I can say about this person posting is that from what I have seen he 
is developing a commercial application and want the list readers to hand 
him all the answers on a silver platter.

Sujan I would recommend that you read the Qt docs as most if not all of 
your questions are addressed in there.  Also what you don't find in the 
Qt docs I would recommend that you do a thorough google search as the 
answer is probably out there already.  If all else fails ask the list.  
Asking is fine but sometimes it seems that you are under the impression 
that the list has to answer.

Cheers,

JD

Srdjan Todorovic wrote:
> Hi,
>
> On 25/06/2009, Sujan Dasmahapatra <sdh at lmglasfiber.com> wrote:
>   
>> Dear Friends
>>
>> I am trying to make static linking for my application....But the
>> executable is still dependent on qwt......I am specifying the  qwt lib
>> in the *.pro file...And building  in release mode bbut when I am doing
>> ldd ./application I can see it's still dependent of qwt and qwt.so file
>> not found it's showing...What I am doing wrong please someone tell me.
>>     
>
> Do you not have any UNIX/Linux/Qt books at your company?
>
> You have probably compiled Qwt as a dynamic library.
> Your application is linking with this dynamic library.
> You need to have the dynamic library somewhere in your LD_LIBRARY_PATH
> or in one of the system paths specified in /etc/ld.so.conf
>
> Either distribute your dynamic Qwt library with your application, or
> compile Qwt as a static library.
>
> To do that you need to configure Qwt to be a static library. There
> will be some sonfiguration option there for you to do it. It probably
> involves editing the .pro file from Qwt and setting some CONFIG option
> to contain the word 'static'.
>
> Srdjan
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>   




More information about the Qt-interest-old mailing list