Results 1 to 11 of 11

Thread: Compiling a dll (TEMPLATE =LIB) with MSVC2012 leads to unresolved external symbol

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2009
    Posts
    29
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Compiling a dll (TEMPLATE =LIB) with MSVC2012 leads to unresolved external symbol

    Hello all,

    I have a small project that I intend to use as a dynamic plugin. That compiles fine under qt_511/linux/gcc, but I cannot succeed to compile with qt_511/windows/msvc2012. The compiler issues a lot of errors with unresolved external symbol. These symbols and classes are actually defined in the main application, and the plugin just has access to the .h definitions. I believe it has nothing to do with the fact that this library is intended to be a plugin, since when I remove all plugin-related macros and such, I still get the same problem under msvc-2012 only (linux/gcc is still fine as far as the compilation goes). I have tried a lot to play with Q_DECL_EXPORT/Q_DECL_IMPORT and Q_CORE_EXPORT with no luck.

    If I add "static" to the CONFIG, it compiles but this is not what I want: I don't want a .lib file I want a .dll

    Any help in understanding why it compiles fine with gcc and not with msvc-2012 will be really appreciated,

    Thanks
    Last edited by maitai; 2nd December 2013 at 20:59.

Similar Threads

  1. Qt5 and MSVC2012 - unresolved external error
    By Blood9999 in forum Newbie
    Replies: 2
    Last Post: 16th February 2013, 20:26
  2. unresolved external symbol for QGLWidget
    By Wasabi in forum Newbie
    Replies: 1
    Last Post: 13th May 2011, 11:56
  3. unresolved external symbol
    By gridolfi in forum Qt Programming
    Replies: 1
    Last Post: 8th September 2009, 17:58
  4. unresolved external symbol
    By tgreaves in forum Qt Programming
    Replies: 2
    Last Post: 16th January 2009, 19:49
  5. Unresolved External Symbol
    By munna in forum General Discussion
    Replies: 1
    Last Post: 10th May 2006, 19:25

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.