delorie.com/archives/browse.cgi | search |
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 |
Message-ID: | <004601c24db8$28c733e0$46ca09c0@aniraj> |
Reply-To: | "Niraj Agarwal" <niraja AT npi DOT stpn DOT soft DOT net> |
From: | "Niraj Agarwal" <niraja AT npi DOT stpn DOT soft DOT net> |
To: | "Gerrit P. Haase" <freeweb AT nyckelpiga DOT de> |
Cc: | <cygwin AT cygwin DOT com> |
References: | <001a01c24da3$35aec790$46ca09c0 AT aniraj> <50-323541628 DOT 20020827115036 AT familiehaase DOT de> |
Subject: | Re: DLL Linking Problem |
Date: | Tue, 27 Aug 2002 16:24:47 +0530 |
MIME-Version: | 1.0 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000 |
X-Virus-Scanned: | by AMaViS perl-11 |
X-MIME-Autoconverted: | from base64 to 8bit by delorie.com id g7RAsFR27923 |
Hi Gerrit, This is really simple. But problem is that i want to include the dll prepared using vc++ in program written in cygwin environment. Please help me in this regard. Niraj ----- Original Message ----- From: "Gerrit P. Haase" <freeweb AT nyckelpiga DOT de> To: "Niraj Agarwal" <niraja AT npi DOT stpn DOT soft DOT net> Cc: <cygwin AT cygwin DOT com> Sent: Tuesday, August 27, 2002 3:20 PM Subject: Re: DLL Linking Problem > Niraj schrieb: > > [dll problems with simple dll] > > Your example is not simple, see this really simple example: > > TestDll.c: > ========== > #include <stdio.h> > void printVal() > { > printf("Hello World!"); > } > > TestDll.h: > ========== > void printVal(); > > testmain.c: > =========== > #include "TestDll.h" > int main() > { > printVal(); > return 1; > } > > > $ gcc -c TestDll.c -o TestDll.o > > $ gcc -shared -o cygTestDll.dll \ > -Wl,--out-implib=libTestDll.dll.a \ > -Wl,--export-all-symbols \ > -Wl,--enable-auto-import \ > -Wl,--whole-archive TestDll.o \ > -Wl,--no-whole-archive > Creating library file: libTestDll.dll.a > > $ gcc -o testmain testmain.c -L. -lTestDll > > $ ./testmain > Hello World! > > > Gerrit > -- > =^..^=
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |