PDA

View Full Version : How to link a Qt .exe to a dll dynamically?



babygal
16th November 2010, 11:02
I have a Qt application , app.exe . I want to link this app.exe to a dll, projdll.dll dynamically. How do I do that?

Here's the code in app.pro :

LIBS += ./include/projdll.lib

high_flyer
16th November 2010, 11:22
Can you be a bit more specific?
Do you want to know how DLL are linked in general?
Do you want to know what project settings to set for DLL linking?
Or maybe you have a problem with pro file settings?
What is the problem you have, what have you done and what didn't work?

babygal
18th November 2010, 08:43
Segmentation fault occurs when data from dll memory is passed to exe memory using stl vector .
So I want to link both the exe and dll dynamically to see if the segmentation fault can be resolved.

squidge
18th November 2010, 09:22
DLL IS dynamically linked, thats what it stands for: Dynamically Linked Library.

high_flyer
18th November 2010, 09:37
and

Segmentation fault occurs when data from dll memory is passed to exe memory using stl vector .
This is in runtime, which means the danymic linkage is resolved ok.
It seems you have a problem in the implement ion, either of the lib, or in your application, probably in your application, you are trying to access a NULL obj (your vector) or maybe you go over the vector bounds or similar.

produktdotestow
18th November 2010, 18:33
LIBS += -lprojdll -Linclude