Did you compile that library in release or debug mode? Do you use the same mode for your application?
Did you compile that library in release or debug mode? Do you use the same mode for your application?
i did build both in debug mode.
and tried both in release-mode too - doesn't help.
I attached my files, perhaps someone would like to help and see if he can reproduce the problem
(or - better - tell me what i'm making wrong)
steps to reproduce:
Qt Code:
unpack attached zip set CPPLIBS=absolutepath to libs-dir (used by qmake-scripts) cd libs qmake make cd .. cd PetManager qmake make debug\PetManagerTo copy to clipboard, switch view to plain text mode
I think it works:Originally Posted by niko
(I use PLD Linux and Qt 4.1.1).ohje
"
<object class="PetList" name="" >
<object class="Pet" name="" >
<property name="Type" type="QString" value="Kuh" />
<property name="Breed" type="QString" value="Schwarzbunt" />
<property name="Name" type="QString" value="Serena" />
<property name="ID" type="int" value="20" />
<property name="Birthday" type="QDate" value="2001-02-12" />
<object class="Maintenance" name="" >
<property name="Event" type="QString" value="Klauen schneiden" />
<property name="Date" type="QDate" value="2006-01-12" />
<property name="Cost" type="int" value="100" />
</object>
</object>
</object>
"
Hallo
Did you buld those libraries as static ones or as DLLs? Did you try to copy all DLLs to the directory where your executable is?
much thanks for testing!
(how bad it works for you... probably only a problem on win32?)
[qoute]Did you buld those libraries as static ones or as DLLs? Did you try to copy all DLLs to the directory where your executable is?[/quote]
as dll (the standard-behaviour)
...and yes - i copied the dlls into the direcotory.
Yes, I just checked the sources and all classes are declared like this:Originally Posted by niko
Which means that they aren't ready for use in DLLs (in short: you can't use those classes outside the DLL, because they're not exported).Qt Code:
Q_OBJECT // ... };To copy to clipboard, switch view to plain text mode
It should be:Where EXPORT macro is either __declspec(dllimport), __declspec(dllexport) or empty. See this thread for more info.Qt Code:
Q_OBJECT // ... };To copy to clipboard, switch view to plain text mode
aaah, much thanks for that hint!
i compiled the libary now static and everything is working just fine!
big thanks!
Bookmarks