delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/07/20/19:01:19

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
X-Authentication-Warning: yakko.chicks.net: chicks owned process doing -bs
Date: Fri, 20 Jul 2001 19:00:12 -0400 (EDT)
From: Christopher Hicks <chicks AT chicks DOT net>
To: Cygwin Discussion List <cygwin AT cygwin DOT com>
Subject: Makefile.DLLs dll_init.c doesn't link
Message-ID: <Pine.LNX.4.33.0107201846380.15277-100000@yakko.chicks.net>
Organization: Flamingo Internet Navigators
MIME-Version: 1.0

I've tried following the instructions on creating DLL's under win32 found
at:
	http://www.cs.mu.oz.au/~fjh/gnu-win32/how-to-build-dlls.html
I've run into a minor problem and I wonder if someone may have seen it
before.  Everything goes well until it tries to do the ?final link and it
has a problem compiling dll_init.c which is generated in Makefile.DLLs.
This is the output I get:

------------------------------make output-------------------------------
dlltool  		\
	--def pal2bsv.def					\
	--dllname pal2bsv.dll				\
	--output-exp pal2bsv.exp				\
	--output-lib pal2bsv_dll.a
echo "/* automatically generated by Makefile.DLLs */"	> pal2bsv_dll.c
echo "void *_impure_ptr;"				>> pal2bsv_dll.c
gcc    -c -o pal2bsv_dll.o pal2bsv_dll.c
ld   --dll -o pal2bsv.dll			\
	-e _dll_entry AT 12 					\
	pal2bsv.exp pal2bsv.a pal2bsv_dll.o				\
	dll_init.o dll_fixup.o					\
	 					\
	-L/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5 -L/usr/lib
-L/usr/lib/w32api -lgcc -lcygwin -lkernel32 -lgcc
pal2bsv.a(genfunc.o)(.text+0x17b):genfunc.c: undefined reference to
`MessageBoxA AT 16'
dll_init.o(.text+0x4):dll_init.c: undefined reference to
`__imp_reent_data'
make: *** [pal2bsv.dll] Error 1
rm pal2bsv.exp pal2bsv_dll.o pal2bsv_dll.c
------------------------------make output-------------------------------

The source for dll_init.c that is produced by Makefile.DLLs is:
------------------------------dll_init.c--------------------------------
#include <stdio.h>
extern struct _reent *_impure_ptr;
extern struct _reent *__imp_reent_data;
__attribute__((stdcall))
int dll_entry(int handle, int reason, void *ptr)
{ _impure_ptr=__imp_reent_data; return 1; }
------------------------------dll_init.c--------------------------------

I'm using the latest version of cygwin just installed a few days ago on an
NT4 Workstation with service pack 6 on it.

-----------------------------screen output------------------------------
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs
gcc version 2.95.3-5 (cygwin special)

chicks AT CHICKS_NT4WKS ~
$ ld -v
GNU ld version 2.11.90 (with BFD 2.11.90)
-----------------------------screen output------------------------------

Any suggestions would be greatly appreciated.  It's been a long time since
I've done DLL development for Windows and when I was doing it long ago I
used Borland C++.

-- 
</chris>

Given enough time and money, eventually Microsoft will re-invent UNIX.
                      -- From a Slashdot.org post



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