Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Since you are using cmake, for linking directives instead of using add_definitions, use target_link_libraries</p> <pre><code>target_link_libraries(&lt;targetname&gt; "-Wl,--no-as-needed") target_link_libraries(&lt;targetname&gt; &lt;libraries that you want to link even if apparently not necessary&gt;) target_link_libraries(&lt;targetname&gt; "-Wl,--add-needed") target_link_libraries(&lt;targetname&gt; &lt;libraries that you want to link according to the "default" criteria&gt;) </code></pre> <p>Reference: <a href="http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:target_link_libraries" rel="nofollow">http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:target_link_libraries</a></p> <p>Also, for -fPIC and the like it's advisable that you use variables like CMAKE_CXX_FLAGS, and that you append flags to it.</p> <p>set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")</p> <p>Note: using list and append will not work with this, as normally lists elements are separated with semicolons. You can have flags depending on the type of build, for example CMAKE_CXX_FLAGS_DEBUG and CMAKE_CXX_FLAGS_RELEASE.</p> <p><a href="http://www.cmake.org/cmake/help/v2.8.11/cmake.html#variable:CMAKE_LANG_FLAGS_DEBUG" rel="nofollow">http://www.cmake.org/cmake/help/v2.8.11/cmake.html#variable:CMAKE_LANG_FLAGS_DEBUG</a> <a href="http://www.cmake.org/cmake/help/v2.8.11/cmake.html#variable:CMAKE_LANG_FLAGS_RELEASE" rel="nofollow">http://www.cmake.org/cmake/help/v2.8.11/cmake.html#variable:CMAKE_LANG_FLAGS_RELEASE</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload