Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Cmake 2.8.10 with Qt 5.0.1 under Win8 with VS2012: undefined external symbol
Forum Updated to NodeBB v4.3 + New Features

Cmake 2.8.10 with Qt 5.0.1 under Win8 with VS2012: undefined external symbol

Scheduled Pinned Locked Moved 3rd Party Software
2 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Meteorhead
    wrote on last edited by
    #1

    Hi!

    I have started fiddling with CMake aiming to serve as the makefile for a new project aiming linux and Windows platforms, involving many other libs, test modules, etc. Therefore it seems like the optimal choice. I wanted to create a comprehensive "tutorial" for some friends (and collegues) coming mainly from the Windows side of application development. Heavily commented makefiles with multiple interdependant projects, each showing one feature of CMake and getting more complex down the road.

    However with Qt involved I cannot even compile two simple projects, one targeting a shared library containing a simple QObject inherited class, and the other targeting an executable linking againts this library. Problem is that not even the library fails at linking with unresolved externals. I have built projects with both qmake before and the VS-plugin, but something is missing here. It seems as if the generated MOC files would not contain the required symbols or if cmake would not add them to the sources when building the target.

    (I have removed some comments to make post shorter)

    "Source code":http://pastebin.com/uFyRzdHE

    "CMakefiles":http://pastebin.com/ZkDg6QfW

    "nmake output":http://pastebin.com/EeSq5hcg

    Naturally problems arise when USE_QT5 is set. All help is greatly appreciated.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tilsitt
      wrote on last edited by
      #2

      Hi,

      According to the "documentation":http://www.cmake.org/cmake/help/v2.8.10/cmake.html#prop_tgt:AUTOMOC, only Qt4 is supported using AUTOMOC. Does the QT5_WRAP_CPP macro work?

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved