<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
William A. Hoffman wrote:
<blockquote cite="mid6.2.3.4.2.20060601133655.09d043b0@pop.nycap.rr.com"
 type="cite">
  <pre wrap="">At 01:22 PM 6/1/2006, Brandon J. Van Every wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Brad King wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Brandon J. Van Every wrote:
      </pre>
      <blockquote type="cite">
        <pre wrap="">I built a CMake 2.4.2 for Cygwin from sources.  I used the "Unix linefeed" download, cmake-2.4.2.tar.gz.  I used an earlier Cygwin CMake package to build it.  Now I am using this Cygwin CCMake 2.4.2 to generate my Chicken build.  When it comes time to link a .dll, it fails with:

Linking C shared library libchicken.dll
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find
-ldl
collect2: ld returned 1 exit status
make[2]: *** [libchicken.dll] Error 1
make[1]: *** [CMakeFiles/libchicken.dir/all] Error 2
make: *** [all] Error 2
        </pre>
      </blockquote>
      <pre wrap="">If libchicken is trying to link to -ldl this is probably because you are telling to do so somewhere in your CMakeLists.txt code.
      </pre>
    </blockquote>
    <pre wrap="">Hm!  You know, there is a conditional -ldl in there.  I haven't noticed that in a long time.  I wonder why it's giving this behavior on Cygwin when previously it didn't.  I will investigate.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
There is a variable CMAKE_DL_LIBS, that you can use without an if.

 TARGET_LINK_LIBRARIES(chicken ... ${CMAKE_DL_LIBS})
  </pre>
</blockquote>
I have investigated, and I'm not convinced that the -ldl is coming from
my code.&nbsp; My code is:<br>
<br>
CHECK_INCLUDE_FILE(dl.h HAVE_DL_H)<br>
IF(HAVE_DL_H)<br>
&nbsp; ADD_DEFINITIONS(-DHAVE_DL_H)<br>
&nbsp; SET(EXTRA_LIBS ${EXTRA_LIBS} ldl)<br>
ENDIF(HAVE_DL_H)<br>
<br>
There is no dl.h on any hard drive of my system.&nbsp; Which is to be
expected, as it's a Linux thing.&nbsp; I think the -ldl more likely from
building CMake 2.4.2 on Cygwin incorrectly.&nbsp; I will await your
canonical version and see if the problem goes away.<br>
<br>
<br>
Cheers,<br>
Brandon Van Every<br>
<br>
</body>
</html>