Results 1 to 3 of 3

Thread: Compiling qshortcutdialog on Windows with mingw

  1. #1
    Join Date
    Feb 2007
    Posts
    81
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Compiling qshortcutdialog on Windows with mingw

    I have been using the QShortcutManager class from edyuk on os x for quite some time now, and I am just now getting around to compiling the code on windows, and I get this error:

    Qt Code:
    1. release\moc_qshortcutdialog.cpp:40: error: definition of static data member 'QShortcutDialog::staticMetaObject' of dllimport'd class.
    2. release\moc_qshortcutdialog.cpp:40: warning: 'QShortcutDialog::staticMetaObject' defined locally after being referenced with dllimport linkage
    3. mingw32-make[1]: *** [release\moc_qshortcutdialog.o] Error 1
    To copy to clipboard, switch view to plain text mode 

    I can't find much documentation about any error like this. does anyone have any ideas? thanks for the help,
    dave

  2. #2
    Join Date
    Feb 2007
    Posts
    81
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Compiling qshortcutdialog on Windows with mingw

    I found a post here that had some example code similar to what is in qcumber.h, so i changed qcumber.h to read:

    Qt Code:
    1. #ifdef _QCUMBER_BUILD_
    2. #if (defined(QT_DLL) || defined(QT_SHARED)) && !defined(QT_PLUGIN)
    3. #define QCUMBER_EXPORT Q_DECL_EXPORT
    4. #else
    5. #define QCUMBER_EXPORT Q_DECL_IMPORT
    6. #endif
    7. #else
    8. #define QCUMBER_EXPORT
    9. #endif
    To copy to clipboard, switch view to plain text mode 

    instead of

    Qt Code:
    1. #ifdef _QCUMBER_BUILD_
    2. #if (defined(QT_DLL) || defined(QT_SHARED)) && !defined(QT_PLUGIN)
    3. #define QCUMBER_EXPORT Q_DECL_EXPORT
    4. #else
    5. #define QCUMBER_EXPORT
    6. #endif
    7. #else
    8. #define QCUMBER_EXPORT Q_DECL_IMPORT
    9. #endif
    To copy to clipboard, switch view to plain text mode 

    it works now, so i'll take it, but i'm really not sure if that's the proper fix.

  3. #3
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Compiling qshortcutdialog on Windows with mingw

    Quote Originally Posted by dvmorris View Post
    it works now, so i'll take it, but i'm really not sure if that's the proper fix.
    That's a proper fix. Apologies for it not working in the version you used but I also think it is important to mention that the SVN was alright :

    $ svn co https://edyuk.svn.sourceforge.net/sv...dparty/qcumber qcumber
    Current Qt projects : QCodeEdit, RotiDeCode

Similar Threads

  1. using libcurl in QT with Mingw in Windows
    By ct in forum Qt Programming
    Replies: 18
    Last Post: 23rd January 2012, 01:41
  2. How do I use MinGW Compiler in Windows
    By Walsi in forum General Discussion
    Replies: 3
    Last Post: 11th May 2007, 08:50
  3. On windows: MinGW + Qt + Which Debugger?
    By Dwarf007 in forum Newbie
    Replies: 8
    Last Post: 12th July 2006, 19:21
  4. qt and mingw can not run on windows 98?
    By evewei in forum Installation and Deployment
    Replies: 4
    Last Post: 26th June 2006, 09:22
  5. Replies: 10
    Last Post: 28th April 2006, 15:48

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.