Dear all.<br>Thanks for replying before.<br><br>I have 1 more question.<br><br>With your help, I can make both(shared &amp; static) libraries.<br><br>However, in my bin/ directories, target must link with static library.<br>
<br>for example, there two directories.<br><br><span style="font-weight: bold;">bin/</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; bin.c</span><br style="font-weight: bold;"><span style="font-weight: bold;">
lib/</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; libmy.a</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; libmy.so</span><br><br>I wanna make binary like following :<br>&nbsp; 
<span style="font-weight: bold;">&quot;gcc -o bin bin.c ../lib/libmy.a -lpthread -lcrypt&quot;</span><br><br><br>For this, I make CMakeLists.txt like following :<br>...<br><span style="font-weight: bold;">LINK_DIRECTORIES(../lib)
</span><br><span style="font-weight: bold;">LINK_LIBRARIES(crypt pthread my)</span><br style="font-weight: bold;"><span style="font-weight: bold;">ADD_EXECUTABLE(bin bin.c)</span><br>...<br><br>But that is linked with shared library. 
<br>LINK_LIBRARIES command doesn&#39;t have &#39;static&#39; option, I think...<br><br>So, I try like this :<br>...<br><span style="font-weight: bold;">LINK_LIBRARIES(crypt pthread)</span><br style="font-weight: bold;">
<span style="font-weight: bold;">ADD_EXECUTABLE(bin bin.c ../lib/libmy.a)</span><br>...<br><br><br>It doesn&#39;t work...:(<br><br>Can I link statically with specific library?<br>Maybe, must I use cmake properties?<br><br>
Thanks for reading.<br>