Mail Archives: djgpp/2001/10/01/18:49:17
Message-ID: | <3BB8EEB7.23B6D3C7@mail.rosecom.ca>
|
From: | April <awhite AT mail DOT rosecom DOT ca>
|
X-Mailer: | Mozilla 4.75 [en]C-CCK-MCD {TLC;RETAIL} (Win95; U)
|
X-Accept-Language: | en
|
MIME-Version: | 1.0
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | using rsxntdj to create a dll for use with MS VB
|
Lines: | 48
|
Date: | Mon, 01 Oct 2001 18:31:19 -0400
|
NNTP-Posting-Host: | 205.189.215.28
|
X-Trace: | client 1001975306 205.189.215.28 (Mon, 01 Oct 2001 18:28:26 EDT)
|
NNTP-Posting-Date: | Mon, 01 Oct 2001 18:28:26 EDT
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
version:
Reading specs from c:/tools/gnu/rsxntdj/lib/specs
gcc driver version 2.95.2 19991024 (release) executing gcc version 2.8.1
I know it can be done, since I adpated some C compression code and
actually made a vb-callable dll. It can even handle call back
functions.
I want to create a simple dll for my own use, of common stuff that C can
do more efficiantly than VB, but I discovered something very peculiar.
I copied the working dll stuff to a new dir, renamed everything, etc,
etc, and compiled. I got a huge list of errors, a sample being:
gccw32 -Wall -O3 -Zsys -I..\include -Zdll -c deltalib.c
gccw32 -Wall -O3 -Zsys -Zdll -o deltalib.dll deltalib.o strcount.o -ldll
-lmain -Ttext=0x10001000
c:/.../libc.a(startup.o)(.text+0xc7):startup: undef ref `_nfiles'
c:/.../libc.a(startup.o)(.text+0xd2):startup: undef ref `_files'
c:/.../libc.a(startup.o)(.text+0xe0):startup: undef ref `_lookahead'
c:/.../libc.a(startup.o)(.text+0xea):startup: undef ref `_io_ninherit'
c:/.../libc.a(startup.o)(.text+0x149):startup: undef ref `_files'
c:/.../libc.a(startup.o)(.text+0x16c):startup: undef ref `_nfiles'
c:/.../libgcc.a(frame.o)(.text+0x1ff):frame: undef ref `malloc'
c:/.../libgcc.a(frame.o)(.text+0x6d3):frame: undef ref `malloc'
c:/.../libgcc.a(frame.o)(.text+0x704):frame: undef ref `free'
c:/.../libgcc.a(frame.o)(.text+0x755):frame: undef ref `abort'
c:/.../libgcc.a(frame.o)(.text+0x815):frame: undef ref `free'
c:/.../libgcc.a(frame.o)(.text+0x826):frame: undef ref `abort'
(I've abbreviated parts)
If I add a simple function to my dll startup module:
void Prepare( void )
{
( void )fopen( "", "" );
}
the dll is created with nary a warning nor error!
any thoughts as to what causes this behavious, and is there a more
elegant way to force fopen() to be linked in than a dummy function as
above?
April
- Raw text -