Subject: dlltool and ld combination does not work
From: [email-masked] ("Bappa Pal")

5 Feb 1997 14:47:17 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Original-To: <[email-masked]>
X-MSMail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1155
Original-Sender: [email-masked]

I am developing under windows 95 using gnu-win32. My goal is to port unix
code to win95 and build a dll to access the functions.

I am trying to follow the example provided on your web site to build a DLL.

I am getting an error everytime I use ld to build the dll. The test case I
am using is very simple. I have a C file called vp_print.c with the
following code:

#include <stdio.h>
#include <stdlib.h>

void vp_print(char *str_txt)
{
	char str[10];

      strcpy(str, str_txt);

}

DEF file test.def :

EXPORTS
vp_print

I use the following commands to compile the file:

dlltool -v --def test.def --output-exp test.exp --output-lib test.a
--dllname test.dll

gcc -c vp_print.c

ld -T/usr/ashwin/i386pe.x -o test.dll test.exp vp_print.o

Note:i386pe.x is the linker script with path names including the c library
locations.

** I get the following error when I run the ld command

vp_print.o(.text+0xf):vp_print.c: undefined reference to `strcpy'

Why is this happening. I have provided the paths to the necessary
libraries. Happens with any C function I use, printf, etc....
Greatly appreciate any suggestions you might have regarding this error.

My e-mail address is : [email-masked]

Thanks 
Ashwin Srinivasan

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".