delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/11/22/09:08:21

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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" <garbage_collector AT telia DOT com>
To: "Cygwin Mailing List" <cygwin AT cygwin DOT com>
Subject: RE: linking 3rd party DLLs to my code.
Date: Sat, 22 Nov 2003 15:07:37 +0100
Message-ID: <NGBBLLIAMFLGJEOAJCCEKEHNDGAA.garbage_collector@telia.com>
MIME-Version: 1.0
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 <files> -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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019