Re: What am I missing? Unresolved externals
Quote:
Originally Posted by jacek
Well... one might expect that this should be placed in different parts of the documentation too, but you can't say it isn't explained ;)
Okay, sorry I missed that but it is hidden away! Besides, when writing plugins there is no need to ever look up the documentation for QLibrary - this information should be mentioned in the plugin documentation.
Quote:
Originally Posted by jacek
Anyway, the Trolls are responsible for the documentation, so you should ask them, not users of this forum.
Come on, seriously! The Trolls are also responsible for the code, should I reserve code questions for them also?
Anyway, thankyou for pointing me to the documentation in QLibrary - that's all I was after!
Re: What am I missing? Unresolved externals
Quote:
Originally Posted by Paul Drummond
Come on, seriously! The Trolls are also responsible for the code, should I reserve code questions for them also?
What Jacek meant was that you should ask them (and not us) why they did or didn't place anything in the documentation. We're not sightseers, Trolls don't tell us about everything they do ;)
And about code questions -- yes, if you want to know why they did something in a particular way, it's best to ask them. And some of the Trolls are present on this forum (although I fear none of the core programmers, but I might be wrong), so it shouldn't be too hard :) They are friendly people and do answer questions...
We answer mostly questions "what to do to achieve that" or "why doesn't it work". We often don't have the knowledge to answer why a particular design was chosen by TT.
Re: What am I missing? Unresolved externals
Quote:
Originally Posted by wysota
What Jacek meant was that you should ask them (and not us) why they did or didn't place anything in the documentation. We're not sightseers, Trolls don't tell us about everything they do ;)
When you say I should ask them do you mean post to qt-interest or email the trolls directly?
If you mean ask them directly then that would be a private discussion and others wouldn't benefit from any solution or advice the trolls gave me. By voicing oppinion on this public forum others are able to gain from the advice, progress, etc.
If you mean ask qt-interest, then fine - I will. I can't access qt-interest from work that's all and I prefer internet forums such as QtCentre but I didn't realise you couldn't voice oppinion on this forum - I won't do it again :confused:
Anyway, this is getting off-topic. Sorry if I've upset anyone or asked the wrong questions.
Re: What am I missing? Unresolved externals
Quote:
Originally Posted by Paul Drummond
When you say I should ask them do you mean post to qt-interest or email the trolls directly?
It's your choice. Mailing TT directly will probably yield a more complete answer, especially if you're lucky and ask a proper person :)
Quote:
If you mean ask them directly then that would be a private discussion and others wouldn't benefit from any solution or advice the trolls gave me. By voicing oppinion on this public forum others are able to gain from the advice, progress, etc.
Yes, of course. But nobody said you can't post results of that conversation here.
Quote:
If you mean ask qt-interest, then fine - I will. I can't access qt-interest from work that's all and I prefer internet forums such as QtCentre but I didn't realise you couldn't voice oppinion on this forum - I won't do it again :confused:
Of course you can express your opinions on the forum. Did anyone forbid you from doing that? We just said we don't know why TT prefers one solution over another. On the other hand you didn't exactly express a neutral opinion. You were complaining TT didn't do something and said TT should do it without checking if they already did.
Quote:
Anyway, this is getting off-topic.
I assure you there are threads which are way off more offtopic than this one :)
Quote:
Sorry if I've upset anyone or asked the wrong questions.
I'm sure you didn't upset anyone. And there are no wrong questions (although some may be very trivial). Jacek just said you were asking wrong people :)
Re: What am I missing? Unresolved externals
Quote:
Originally Posted by wysota
Of course you can express your opinions on the forum. Did anyone forbid you from doing that? Jacek just said you were asking wrong people :)
I understand what you are saying but if I were to follow your advice I would never use this forum again! I should just email TT when I have a problem, then post the results to this forum! :) How do I know if my questions are inappropriate for this forum or not? If I ask them here and you guys say "Sorry, no idea - ask TT", then that's exactly what I will do :)
Anyway, forget it - I totally understand your point - I just like having the last word ;)
Re: What am I missing? Unresolved externals
Quote:
Originally Posted by Paul Drummond
I'm sorry, but can someone please explain to me why all this isn't explained in the Qt documentation? When reading about plugins and QLibrary, the Troll's should state if the code won't work on a particular platform. If I developed a plugin in Linux I would expect it to work on all supported platforms WITHOUT CODE CHANGES. I would accept configuration and compilation issues, but this is a code modification which isn't acceptable IMO.
If you set up the export macro as instructed, you wont need code changes.
Re: What am I missing? Unresolved externals
Quote:
Originally Posted by Chicken Blood Machine
If you set up the export macro as instructed, you wont need code changes.
True, my point was that it's not clear from the plugin documentation that the macros are needed and it certainly isn't stated in the tutorial steps ( http://doc.trolltech.com/4.1/plugins...t-applications).
Come to think of it does the plug&paint example doesn't use the macros either, even on Windows. What's that about???? :confused:
Re: What am I missing? Unresolved externals
Quote:
Originally Posted by Paul Drummond
Come to think of it does the plug&paint example doesn't use the macros either, even on Windows. What's that about???? :confused:
Here's an answer from one of the Qt Quaterly articles:
Quote:
In most cases, exporting the plugin in this way is sufficient to ensure that Qt Designer and other applications can access the widget when using uic or with Qt's dynamic form loading facilities. If you want to use the custom widget directly by linking your application against the plugin, you must export the custom widget class explicitly
Re: What am I missing? Unresolved externals
I have a same error. I solve the problem like this;) :
Code:
class DLLEXPORT_MODULE1 module1{
.....
};
class DLLEXPORT_MODULE2 module2{
.....
};
.
.
.
#ifdef DLLBUILD_MODULE1
#define DLLEXPORT_MODULE1 __declspec(dllexport)
#else
#define DLLEXPORT_MODULE1
#endif
#ifdef DLLBUILD_MODULE2
#define DLLEXPORT_MODULE2 __declspec(dllexport)
#else
#define DLLEXPORT_MODULE2
#endif
Re: What am I missing? Unresolved externals
You just need to stick this in a <your project>_globaL.h file and include it in you entry point class:
Code:
#include <Qt/qglobal.h>
#ifdef QTTIFFIMAGEHANDLER_LIB
# define QTTIFFIMAGEHANDLER_EXPORT Q_DECL_EXPORT
#else
# define QTTIFFIMAGEHANDLER_EXPORT Q_DECL_IMPORT
#endif
I've created a Qt Library project with the VS integration and that's the only win32 specific stuff that you need to create a dll.
It also is likely to depend on other project options, but this is the only reference you need to the DLL_EXPORT macros.
Q_DECL_EXPORT is just a redefined wrapper to DLL_EXPORT, similar I spose in the UINT16 idea that MS tend to use.
Redefine everything to make them non specific ;)
I hope this helps someone.