This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to write minimal program using GD library


Siegfried Heintze wrote:

> I cannot get it to work, however, with g++ or msvc v7. When I follow the

I very much doubt that you will be able to use Cygwin libraries with
MSVC, unless you know precisely what you're doing.

> directions with gcc, it compiles and links fine but when I try to run the
> resulting program, I get the following error:
> 
> This application has failed to start because cygXpm-4.dll was not found.
> Re-installing the application may fix this problem.

This means that the DLL is either not installed or is not in the path. 
Windows has a specific search order for a needed DLL, which in most
cases means it must be in the same directory as the .exe or in the
PATH.  (Search MSDN for LoadLibrary for the details.)

The cygwin package search page at <http://cygwin.com/packages/> will
easily show you that this DLL is part of the xorg-x11-bin-dlls package
and that the DLL is installed into /usr/X11R6/bin.  If you have the
package installed then you need to ensure that /usr/bin and
/usr/X11R6/bin are both in the PATH.  If you run your program from a
bash prompt then this should already be the case, but if you try to run
the program outside of that you will need to add the paths (in Windows
form, not as /usr/bin) to your system PATH variable explicitly.

Note that because of this Windows requirement that a DLL be in the PATH
or the directory of the .exe, that the actual DLLs for libraries (e.g.
cygfoo.dll) are placed under /usr/bin, whereas the import libraries
(e.g. libfoo.dll.a) that are used for linking are placed in /usr/lib
which is where the compiler searches for libraries on a normal unix-like
system.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]