Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Compile project using CMAKE

Compile project using CMAKE

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.9k Views
  • 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.
  • C Offline
    C Offline
    curator
    wrote on last edited by
    #1

    Hi all,

    I have started to port my project from standard VS to CMAKE definition during the transition to QT5 in order to be system independent. My project is quite huge, basically using Qt5 and VTK6.

    First, my code runs for Windows and I can generate my complete source code and execute it.

    Now I am trying to do the same in linux, and I got some code errors - as expected. After fixing them, I started the the same CMakeLists.txt as in windows, but the linker fails.

    @
    /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lQt5::Sql
    /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lQt5::OpenGL
    /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lQt5::WebKitWidgets
    @

    Interesting, because my Code does not use any part of Webkit, but if he would like to use it, I try to change the CMAKE file from

    @qt5_use_modules(SoPaRa Core Widgets Xml XmlPatterns)@

    to

    @qt5_use_modules(SoPaRa Core Sql OpenGL WebKitWidgets Widgets Xml XmlPatterns)@

    but that causes new errors of webkit linker
    @Qt5.1.0/5.1.0/gcc_64/lib/libQt5WebKit.so.5.1.0: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)@GLIBCXX_3.4.15'
    collect2: ld gab 1 als Ende-Status zurück
    @

    Hm, however, how can I tell CMAKE not to use something like webkit, because I think it is not needed at all (it isnt in windows)

    kind regards,
    curator

    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