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 From: "Hannu E K Nevalainen" To: "Cygwin Mailing List" Subject: RE: linking 3rd party DLLs to my code. Date: Sat, 22 Nov 2003 15:07:37 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal In-Reply-To: <3FBF66F3.FF68C5C5@dessent.net> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 > From: Brian Dessent > Sent: Saturday, November 22, 2003 2:39 PM > Suresh Venkatasubramanian wrote: > > > However I am able to link it. putting cg.dll in /usr/local/lib (say) and > > compiling with > > > > gcc -mno-cygwin -L/usr/local/lib -lcg =========== > > > > compiles with no complaints. > > > > However, cygcheck complains, saying that it cannot find the dll. > > > > When I place the dll physically in the dir that I am running > from however, > > the code runs fine. (soft linking doesn't work; the dll has to be > > physically placed there). > > > > What might be the problem with what I am doing ? I suspect that > I am doing > > something wrong to begin with and the fact that I can even link > the DLL is > > an accident, rather than the other way around. Any help would be greatly > > appreciated. > > Unless I'm really missing something, isn't this just a path issue? > AFAIK, every DLL that your program links against must be either in the > path or in the same directory as the .exe (unless the program > specifically looks for it with dlopen() or whatever.) > > If you add /usr/local/lib to your path, or move your dll into a ============== > directory already in the path does that cause it to work as you expect? > I'm not sure why a symlink in the current directory doesn't work but I > suspect it might be that it's Windows that's actually doing the loading > of the exe and its dlls, and Windows does not treat shortcuts as > symlinks. He is compiling with -mno-cygwin, I'd guess that this has some impact here. i.e. cygwin1.dll isn't used -> POSIX paths not available. /Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E ** on a mailing list; please keep replies on that particular list ** -- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); -- --END OF MESSAGE-- -- 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/