[Qt-interest] Re : Re : Re : how to set dll path

BOUCARD Olivier boucard_olivier at yahoo.fr
Tue Sep 20 16:54:00 CEST 2011


What kind of error did you get? Compiler? Linker? Execution?
Any, error log?
We can find a solution, but we can't guess an error... :)




>________________________________
>De : Vincent Cai <wcai at cypress.com>
>À : BOUCARD Olivier <boucard_olivier at yahoo.fr>; "qt-interest at qt.nokia.com" <qt-interest at qt.nokia.com>
>Envoyé le : Mardi 20 Septembre 2011 16h42
>Objet : RE: [Qt-interest] Re :  Re :  how to set dll path
>
>
> 
>Thanks.
>I have tried your method, but fail to access any variable or function except the MACRO definitions.
> 
>From:qt-interest-bounces+wcai=cypress.com at qt.nokia.com [mailto:qt-interest-bounces+wcai=cypress.com at qt.nokia.com] On Behalf Of BOUCARD Olivier
>Sent: 2011年9月20日22:22
>To: qt-interest at qt.nokia.com
>Subject: [Qt-interest] Re : Re : how to set dll path
> 
>Under Windows only symbols, usually classes, decorated with __declspec(dllexport) are available from outside world.
>For C, is different. just put the headers of the C library between extern "C"{}.
> 
>>
>>________________________________
>> 
>>De :Vincent Cai <wcai at cypress.com>
>>À : BOUCARD Olivier <boucard_olivier at yahoo.fr>; "qt-interest at qt.nokia.com" <qt-interest at qt.nokia.com>
>>Envoyé le : Mardi 20 Septembre 2011 16h06
>>Objet : RE: [Qt-interest] Re : how to set dll path
>>One more question:
>>I think the dll with C++ language and created by Qt has exported all the members to application.
>>But I have a dll which is created with pure C language and gcc compiler.
>>I don’t know how to access the global variables and interface in the dll.
>>Is there any document talking about this topic?
>> 
>>Thanks.
>>From:qt-interest-bounces+wcai=cypress.com at qt.nokia.com [mailto:qt-interest-bounces+wcai=cypress.com at qt.nokia.com] On Behalf Of Vincent Cai
>>Sent: 2011年9月20日22:01
>>To: BOUCARD Olivier; qt-interest at qt.nokia.com
>>Subject: Re: [Qt-interest] Re : how to set dll path
>> 
>>Thanks for your reply and I got the answer.
>> 
>>But I am a little confused that why you said that ‘The libraries are loaded before the execution start.’.
>>Isn’t a dll loaded only when requested?
>> 
>>From:qt-interest-bounces+wcai=cypress.com at qt.nokia.com [mailto:qt-interest-bounces+wcai=cypress.com at qt.nokia.com] On Behalf Of BOUCARD Olivier
>>Sent: 2011年9月20日21:12
>>To: qt-interest at qt.nokia.com
>>Subject: [Qt-interest] Re : how to set dll path
>> 
>>Jeremy is right. Setting the library path in the code can't help. It is too late. The libraries are loaded before the execution start.
>>Under Windows, if you do not want to move your dll you have to add your dll directory to the PATH environment variable.
>>Please take a look at http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586%28v=vs.85%29.aspx#search_order_for_desktop_applications.
>> 
>>>
>>>________________________________
>>> 
>>>De :Jeremy Lainé <jeremy.laine at bolloretelecom.eu>
>>>À : qt-interest at qt.nokia.com
>>>Envoyé le : Mardi 20 Septembre 2011 14h58
>>>Objet : Re: [Qt-interest] how to set dll path
>>>
>>>
>>>Le Sep 20, 2011 à 1:00 PM, Vincent Cai a écrit :
>>>
>>>> Dear all,
>>>> 
>>>>        I am newbie with QT. :)
>>>>        Current, I am trying to create an application with external dll.
>>>>        I can create dll successfully.
>>>>        And if I copy the dll to the application directory, the application can load dll and run correctly.
>>>> 
>>>
>>>Unless you are talking about a plugin, to my knowledge no Qt code can help you here : the application will simply not run as the links to the library cannot be resolved.
>>>
>>>You can try adding the directory which contains the DLL to the PATH environment variable though.
>>>
>>>-- 
>>>Jeremy LAINE
>>>Bolloré telecom | 11bis, rue Scribe | F-75009 Paris
>>>
>>>_______________________________________________
>>>Qt-interest mailing list
>>>Qt-interest at qt.nokia.com
>>>http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>> 
>>
>>________________________________
>> 
>>This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.
>> 
>>
>>________________________________
>> 
>>This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.
>> 
>>________________________________
> This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.
> 
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110920/247f4288/attachment.html 


More information about the Qt-interest-old mailing list