Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Compile project using CMAKE

    General and Desktop
    1
    1
    1812
    Loading More Posts
    • 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
      curator last edited by

      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 Reply Quote 0
      • First post
        Last post