Mail Archives: cygwin/1997/02/05/14:47:17
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 : asrinivasan AT mdd DOT com
Thanks
Ashwin Srinivasan
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -