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: | <4.3.1.2.20020424134436.02c1cec0@pop.ma.ultranet.com> |
X-Sender: | lhall AT pop DOT ma DOT ultranet DOT com |
Date: | Wed, 24 Apr 2002 13:44:57 -0400 |
To: | "Sander Timmermans" <atimmer AT rijnh DOT nl>, <cygwin AT cygwin DOT com> |
From: | "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com> |
Subject: | Re: GetModuleHandle AT 4 |
In-Reply-To: | <DBELKNLJAALBBGLBPGDDEEFMCAAA.atimmer@rijnh.nl> |
Mime-Version: | 1.0 |
At 01:13 PM 4/24/2002, Sander Timmermans wrote: >I adapted the script made by John Cerney; >http://cygwin.com/building-reloc-dlls.txt >into this Makefile: >#--------------------------------------------------------------------------- >------------------------------------------------ >LIBPATH= /lib >SOURCES= foo.c foo2.c >OBJECTS= $(SOURCES:%.c=%.o) > >all: $(OBJECTS) init.o fixup.o > echo EXPORTS > fooB.def > nm $? | grep '^........ [T] _' | sed 's/[^_]*_//' >> fooB.def > ld --base-file fooB.base --dll -o fooB.dll $? $(LIBPATH)/libcygwin.a -e >_dll_entry AT 12 > dlltool --as=as --dllname fooB.dll --def fooB.def --base-file >fooB.base --output-exp fooB.exp > ld --base-file fooB.base fooB.exp --dll -o fooB.dll foo.o foo2.o init.o >fixup.o $(LIBPATH)/libcygwin.a -e _dll_entry AT 12 > dlltool --as=as --dllname fooB.dll --def fooB.def --base-file >fooB.base --output-exp fooB.exp > ld fooB.exp --dll -o fooB.dll foo.o foo2.o init.o fixup.o >$(LIBPATH)/libcygwin.a -e _dll_entry AT 12 > dlltool --as=as --dllname fooB.dll --def fooB.def --output-lib fooB.a > gcc main.c fooB.a -o main.exe >#--------------------------------------------------------------------------- >------------------------------------------------ >It worked. >Aferwards I tried to use it in my own Makefile: >#--------------------------------------------------------------------------- >------------------------------------------------ >SOURCES= TWU_read_signal_interlaced.c idl_TWU_read_signal_interlaced.c >idl_TWU_read_signal.c idl_TWU_read_image.c \ > idl_TWU_read_condition.c idl_TWU_read_comment.c >OBJECTS= $(SOURCES:%.c=%.o) >exp: $(OBJECTS) init.o fixup.o $(TWU_ARCHIVE) $(LIBIDL) /lib/libcygwin.a > echo EXPORTS > $(NAME).def > nm $? | grep '^........ [T] _' | sed 's/[^_]*_//' >> $(NAME).def > $(LD) --base-file $(NAME).base --dll -o $(NAME).dll $? -e _dll_entry AT 12 >#--------------------------------------------------------------------------- >------------------------------------------------ >$(LIBIDL) is a win32 library. >but after this $(LD) line I get GetModuleHandle AT 4 as a linker error >(unreferenced symbol) in /libcygwin.a. >Should I use MinGW? Or am I doing something completely revolting by linking >against a win32 library... Try http://cygwin.com/cygwin-ug-net/dll.html instead. Larry Hall lhall AT rfk DOT com RFK Partners, Inc. http://www.rfk.com 838 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |