<div dir="ltr"><div>HI,</div>
<div>i&#39;m building a project with 3 targets in Linux. each target has a different name when in debug.</div>
<div>&nbsp;</div>
<div>the executable i want to link to the 2 libraries fail to find thoz libs when i&#39;m in debug (not the case in release, everything&#39;s good).</div>
<div>&nbsp;</div>
<div>here is the CMakeLists of the executable</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div><font color="#009900">cmake_minimum_required(VERSION 2.6) </font></div>
<div><font color="#009900">include_directories (${ORIGIN}/tst_xsystem/../../../import/xdefaut/inc ${ORIGIN}/tst_xsystem/../../../inc ${ORIGIN}/tst_xsystem/../../../imports/xdefaut/inc )</font></div>
<div><font color="#009900">set(sources ${ORIGIN}/tst_xsystem/../../../src/tst_xsystem.c ${ORIGIN}/tst_xsystem/../../../imports/xdefaut/inc/x_defaut.h)</font></div>
<div><font color="#009900">if (CMAKE_HOST_WIN32)<br>&nbsp; set (sources ${sources} ${ORIGIN}/tst_xsystem/tst_xsystem.rc)<br>endif(CMAKE_HOST_WIN32)<br>if (CMAKE_HOST_UNIX)<br>&nbsp; set (sources ${sources} ${DEST}/tst_xsystem/tst_xsystem.c)<br>
endif(CMAKE_HOST_UNIX)</font></div>
<div><font color="#009900">add_executable(tst_xsystem ${sources})<br>add_dependencies(tst_xsystem&nbsp; libxsystem libxsystem_so)</font></div>
<div><font color="#009900"></font>&nbsp;</div>
<div><font color="#009900"></font>&nbsp;</div>
<div><font color="#009900">if (${CONFIG} MATCHES &quot;DEBUG&quot;)<br>&nbsp;<font color="#cc0000">target_link_libraries(tst_xsystem libxsystemd_so libxsystemd pthread rt dl nsl) ###########&quot;<br></font>else(${CONFIG} MATCHES &quot;DEBUG&quot;)<br>
&nbsp;target_link_libraries(tst_xsystem libxsystem_so libxsystem pthread rt dl nsl)<br>endif(${CONFIG} MATCHES &quot;DEBUG&quot;)</font></div>
<div><font color="#009900">set_target_properties(tst_xsystem PROPERTIES<br>&nbsp;PREFIX &quot;&quot;<br>&nbsp;DEBUG_OUTPUT_NAME &quot;tst_xsystemd&quot;<br>&nbsp;LINKER_LANGUAGE &quot;CXX&quot;<br>&nbsp;LINK_FLAGS_RELEASE ${linkexecutablerel} </font></div>

<div><font color="#009900">)</font></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>the problem is in the red line (marqued ########).</div>
<div>names are differents and the error is </div>
<div>&nbsp;</div>
<div>Linking CXX executable /home/ikemgoum/workspace/reference/xsystem/code/os/linux_redhatEL4_0_i386__gcc3_4/bin/tst_xsystemd<br>/usr/bin/ld: can not find -llibxsystemd<br><br>am i missing something?</div>
<div>thanks for help</div></div>