Results 1 to 5 of 5

Thread: Problem with class type for dll

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,318
    Thanks
    315
    Thanked 870 Times in 857 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Problem with class type for dll

    Well, yeah, if you look at the contents of QtGlobal, it is:

    Qt Code:
    1. #include "qglobal.h"
    To copy to clipboard, switch view to plain text mode 




    But in any case, these export and import macros are only used for building Windows DLLs. They are not used on linux platforms, and are typically #define to be nothing, usually something like this:

    Qt Code:
    1. #ifdef _WIN32 || _WIN64
    2. #define Q_DECL_EXPORT __declspec(dllexport)
    3. #define Q_DECL_IMPORT __declspec(dllimport)
    4. #else
    5. #define Q_DECL_EXPORT
    6. #define Q_DECL_IMPORT
    7. #endif
    To copy to clipboard, switch view to plain text mode 

    So in fact you don't need to put any type of declaration in front of your class names.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  2. The following user says thank you to d_stranz for this useful post:

    cleopa (28th May 2020)

Similar Threads

  1. What is Type information when creating Class
    By vinothrajendran in forum Qt Tools
    Replies: 1
    Last Post: 20th March 2015, 12:11
  2. 'CLASS' does not name a type
    By plopes21 in forum General Programming
    Replies: 4
    Last Post: 27th August 2013, 03:42
  3. Replies: 10
    Last Post: 1st May 2011, 18:27
  4. 'Class' does not name a type error
    By naturalpsychic in forum Qt Programming
    Replies: 9
    Last Post: 1st February 2011, 15:43
  5. Determine Class Type of QObject Parent
    By photo_tom in forum Qt Programming
    Replies: 2
    Last Post: 12th May 2010, 17:42

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
  •  
Qt is a trademark of The Qt Company.