delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/27/20:58:36

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Sat, 27 Oct 2001 20:57:47 -0400 (EDT)
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
X-X-Sender: cwilson AT medulla DOT ibb DOT gatech DOT edu
To: Stephano Mariani <sk DOT cygml AT btinternet DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Some dll questions
In-Reply-To: <001301c15f3b$e3d46020$0100a8c0@sknet01>
Message-ID: <Pine.GSO.4.40.0110272053580.27218-100000@medulla.ibb.gatech.edu>
MIME-Version: 1.0
X-Virus-Scanned: by amavisd-milter (http://amavis.org/)

On Sun, 28 Oct 2001, Stephano Mariani wrote:
> I managed to build functional dlls, but I still have a few questions...
>
> I am familiar with shared libraries on linux, and am wondering whether most
> of the techniques still apply... specifically:
>
> 1) Can I use the dlfcn.h interface?

AFAIK, the dlopen stuff works with cygwin. (That is, cygwin provides
dlopen() functions that are just wrappers over the native windows
LoadLibrary() functions).  dlfcn.h should work, but I haven't tried it.

If not, it's a bug.

> 2) If so, does it behave any differently?

If so, it's a bug.

> 3) Also, does it work with the -mno-cygwin flag too?

Probably not.  cygwin1.dll provides those wrappers.  If you want a native
program, you'll need to use the Windows LoadLibrary() functions directly.
(Also note that the DLL's you're loading must all be compiled with
-mno-cygwin, as well as your program.  Otherwise, you'll have part of your
code depending on msvcrt.dll for runtime services, and part of your code
depending on cygwin1.dll for runtime services.  Badness will ensue.)

--Chuck



--
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/

- Raw text -


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