This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Problems linking program
- From: "Larry Hall (RFK Partners, Inc)" <lhall at rfk dot com>
- To: "Matt Minnis" <mminnis at prefres dot com>, cygwin at sources dot redhat dot com
- Date: Mon, 22 Apr 2002 14:38:24 -0400
- Subject: Re: Problems linking program
At 02:29 PM 4/22/2002, Matt Minnis wrote:
>Larry,
>
>What I am trying to do is guild a library for working with images called GD.
>It is for dynamically creating images, and I got it from:
>http://www.boutell.com/gd/
>
>The libraries and order that I am using is:
>LIBS=-lfreetype -lgd -lz -ljpeg -lpng -lcygwin
>
>I have resolved most of the issues now, but now I seem to be getting an error about a DLL linkage?
>
>Here is the cygwin1.dll that I am using.
>where cygwin1.dll
>D:\cygwin\bin\cygwin1.dll
>
>Here is the current error that I am getting.
>
>/source/gd-2.0.1 >make install
>MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
> rm -f libgd.so.2.0.0 2>/dev/null
>The system cannot find the path specified.
> ld -shared -o libgd.so.2.0.0 gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o
>gd_io_file.o gd_ss.o gd_io_ss.o gd_png.o gd_jpeg.o gdxpm.o gdfontt.o gdfonts.o
> gdfontmb.o gdfontl.o gdfontg.o gdtables.o gdft.o gdcache.o gdkanji.o wbmp.o
> gd_wbmp.o gdhelpers.o gd_topal.o -lfreetype -lgd -lz -ljpeg -lpng -lcygwin
>/usr/lib/libcygwin.a(_cygwin_crt0_common.o)(.text+0xe6): undefined reference to
>`GetModuleHandleA@4'
>
>** error 1 ** deleting libgd.so.2.0.0
OK, I'm not sure why you sent this again to the list when I answered the
same query that you sent me off-list. But in the interest of complete
symmetry, I'll cut and paste the response I already gave you privately.
------------- cut and paste --------------------------------------------
OK. First, you shouldn't need to list -lcygwin. It gets added automatically.
Fortunately now, it should be harmless to list it however. That hasn't always
been the case so it's good not to get in the habit of adding it when it's not
needed.
'GetModuleHandle()' is a Win32 API. You apparently have not installed the
w32api package. Rerun setup and do so.
Larry Hall lhall@rfk.com
RFK Partners, Inc. http://www.rfk.com
838 Washington Street (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/