Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <42B3B332.8C1F8C58@dessent.net> Date: Fri, 17 Jun 2005 22:37:54 -0700 From: Brian Dessent MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: How to write minimal program using GD library References: <8033322 DOT 1119071608859 DOT JavaMail DOT SYSTEM AT CCC-NOVA1> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Report: -5.8/5.0 ---- Start SpamAssassin results * -3.3 ALL_TRUSTED Did not pass through any untrusted hosts * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] * 0.0 AWL AWL: From: address is in the auto white-list ---- End SpamAssassin results X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com 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 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/