Inclusion of windows dll into cygwin code

Larry Hall (RFK Partners, Inc) lhall@rfk.com
Wed Aug 28 08:00:00 GMT 2002


At 10:52 AM 8/28/2002, Niraj Agarwal wrote:
>Hi All,
>
>Let me explain the problem.
>
>I have a compiled a dll into windows environment using VC++ compiler. 


OK, that's clear.


>I have written my main function in c which should use this dll. 


So you mean you've created a main.c with main() and main() will call into the
windows DLL via some function exported from the DLL.  Is that right?


>I would like to compile the code using gcc. 


I'm assuming main.c linking against the .LIB created by VC++ for your DLL,
right?


>I have tried to use the export dll concept explained in cygwin user guide but that is not working for my case and generating ld error.


OK, but we don't know what main.c looks like, what function in the windows
DLL you're calling, how it was exported (as a C or C++ function), how you 
compiled and linked all this, and what the error was.  



>Regards,
>Niraj Agarwal
>----- Original Message ----- 
>From: "Larry Hall (RFK Partners, Inc)" <lhall@rfk.com>
>To: "Niraj Agarwal" <niraja@npi.stpn.soft.net>; "cygwin" <cygwin@cygwin.com>
>Sent: Wednesday, August 28, 2002 8:07 PM
>Subject: Re: Inclusion of windows dll into cygwin code
>
>
> > At 10:36 AM 8/28/2002, Niraj Agarwal wrote:
> > >Hi All,
> > >
> > >Can any body help me in including windows dll into the code compiled in cygwin environment?
> > 
> > 
> > I expect the answer is yes but you'll need to post the details of your 
> > situation and the specific problem before anyone here can take a stab at
> > it.
> > 
> > Sorry if this sounds obvious but sometimes a statement of the obvious is 
> > necessary to get things started.
> > 
> > 
> > Larry Hall                              lhall@rfk.com
> > RFK Partners, Inc.                      http://www.rfk.com
> > 838 Washington Street                   (508) 893-9779 - RFK Office
> > Holliston, MA 01746                     (508) 893-9889 - Return-Path: <cygwin-return-56995-niraja=npi.stpn.soft.net@cygwin.com>
>Received: (from root@localhost)
>         by comet.npi.stpn.soft.net (8.9.3/8.9.3) id NAA32310
>         for niraja@npi.stpn.soft.net; Tue, 27 Aug 2002 13:51:08 +0530
>Received: from sources.redhat.com (sources.redhat.com [209.249.29.67])
>         by comet.npi.stpn.soft.net (8.9.3/8.9.3) with SMTP id NAA31882
>         for <niraja@npi.stpn.soft.net>; Tue, 27 Aug 2002 13:47:43 +0530
>Received: (qmail 14774 invoked by alias); 27 Aug 2002 08:24:11 -0000
>Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
>Precedence: bulk
>List-Unsubscribe: < mailto:cygwin-unsubscribe-niraja=npi.stpn.soft.net@cygwin.com >
>List-Subscribe: < mailto:cygwin-subscribe@cygwin.com >
>List-Archive: < http://sources.redhat.com/ml/cygwin/ >
>List-Post: < mailto:cygwin@cygwin.com >
>List-Help: < mailto:cygwin-help@cygwin.com >, < http://sources.redhat.com/ml/#faqs >
>Sender: cygwin-owner@cygwin.com
>Mail-Followup-To: cygwin@cygwin.com
>Delivered-To: mailing list cygwin@cygwin.com
>Received: (qmail 14764 invoked from network); 27 Aug 2002 08:24:08 -0000
>Received: from unknown (HELO comet.npi.stpn.soft.net) (203.190.139.231)
>   by sources.redhat.com with SMTP; 27 Aug 2002 08:24:08 -0000
>Received: (from root@localhost)
>         by comet.npi.stpn.soft.net (8.9.3/8.9.3) id NAA31738
>         for cygwin@cygwin.com; Tue, 27 Aug 2002 13:46:44 +0530
>Received: from aniraj ([192.9.202.70])
>         by comet.npi.stpn.soft.net (8.9.3/8.9.3) with SMTP id NAA31727
>         for <cygwin@cygwin.com>; Tue, 27 Aug 2002 13:46:43 +0530
>Message-ID: < 001a01c24da3$35aec790$46ca09c0@aniraj >
>Reply-To: "Niraj Agarwal" <niraja@npi.stpn.soft.net>
>From: "Niraj Agarwal" <niraja@npi.stpn.soft.net>
>To: "cygwin" <cygwin@cygwin.com>
>Subject: DLL Linking Problem
>Date: Tue, 27 Aug 2002 13:54:48 +0530
>MIME-Version: 1.0
>Content-Type: multipart/mixed;
>         boundary="----=_NextPart_000_0018_01C24DD1.4F09EF70"
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
>X-Virus-Scanned: by AMaViS perl-11
>Status:   
>
>Hi All,
>
>I have written a simple dll using VC++ compiler and now i am trying to link the same to my code running in cygwin environment.
>
>I have created a definition file and using dlltool i have generated .a file. 
>I was able to compile and link program successfully but i am facing one problem when i am trying to run the program. it is saying that entry point for the funtion is not defined in the dll.
>
>Note :The dll file, def file and sample program using dll is also attached.
>
>Please help me in this regard.
>
>Thanks and best regards,
>Niraj Agarwal
>Senior Member Technical Staff
>Network Programs(I) Ltd.
>Noida
>
>
>
>
>
>
>--
>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/
>--
>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/ 


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



More information about the Cygwin mailing list