Page 3 of 3 FirstFirst 123
Results 41 to 50 of 50

Thread: What am I missing? Unresolved externals

  1. #41
    Join Date
    Feb 2006
    Posts
    32
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 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!

  2. #42
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default 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.

  3. #43
    Join Date
    Feb 2006
    Posts
    32
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 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

    Anyway, this is getting off-topic. Sorry if I've upset anyone or asked the wrong questions.

  4. #44
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default 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

    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.

    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
    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.

    Anyway, this is getting off-topic.
    I assure you there are threads which are way off more offtopic than this one
    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

  5. #45
    Join Date
    Feb 2006
    Posts
    32
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 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

  6. #46
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 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.
    Save yourself some pain. Learn C++ before learning Qt.

  7. #47
    Join Date
    Feb 2006
    Posts
    32
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 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????

  8. #48
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 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????
    Here's an answer from one of the Qt Quaterly articles:
    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

  9. #49
    Join Date
    May 2006
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: What am I missing? Unresolved externals

    I have a same error. I solve the problem like this :
    Qt Code:
    1. class DLLEXPORT_MODULE1 module1{
    2. .....
    3. };
    4.  
    5. class DLLEXPORT_MODULE2 module2{
    6. .....
    7. };
    8.  
    9. .
    10. .
    11. .
    12. #ifdef DLLBUILD_MODULE1
    13. #define DLLEXPORT_MODULE1 __declspec(dllexport)
    14. #else
    15. #define DLLEXPORT_MODULE1
    16. #endif
    17.  
    18. #ifdef DLLBUILD_MODULE2
    19. #define DLLEXPORT_MODULE2 __declspec(dllexport)
    20. #else
    21. #define DLLEXPORT_MODULE2
    22. #endif
    To copy to clipboard, switch view to plain text mode 

  10. #50
    Join Date
    Mar 2006
    Posts
    140
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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:
    Qt Code:
    1. #include <Qt/qglobal.h>
    2.  
    3. #ifdef QTTIFFIMAGEHANDLER_LIB
    4. # define QTTIFFIMAGEHANDLER_EXPORT Q_DECL_EXPORT
    5. #else
    6. # define QTTIFFIMAGEHANDLER_EXPORT Q_DECL_IMPORT
    7. #endif
    To copy to clipboard, switch view to plain text mode 

    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.

Similar Threads

  1. Q3ScrollView resists to scroll down to the garbage bin
    By sivrisinek in forum Qt Programming
    Replies: 0
    Last Post: 5th February 2009, 18:50
  2. shared vs static
    By alisami in forum Installation and Deployment
    Replies: 3
    Last Post: 4th October 2008, 14:04
  3. Replies: 16
    Last Post: 23rd May 2008, 11:12
  4. link error for visual studio.net 2003
    By berlin in forum Newbie
    Replies: 9
    Last Post: 29th September 2006, 17:06
  5. Link Errors
    By magikalpnoi in forum Qt Programming
    Replies: 5
    Last Post: 25th September 2006, 23:04

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.