[plt-scheme] multiple definition of dll_entry at 12
Hi,
I have the latest DrScheme and Cygwin installed on Windows XP.
I'm trying to compile the example extension,
collects/mzscheme/examples/helloprint.c, but with the printf line uncommented.
During the --ld step I get
undefined reference to 'puts'
If I add -lc to the -ld step, then I get
multiple definition of dll_entry at 12
Any hints?
I'm appending a log of the compile and link.
Thanks,
Ron
stanonik at cogsci.ucsd.edu
============ log of compile and link ==================
Jim Hollan at surfing /home/plt/collects/mzscheme/examples
$ mzc.exe -v --cc helloprint.c
MzScheme compiler (mzc) version 205, Copyright (c) 1996-2003 PLT
"helloprint.c":
compile-extension: (C:\cygwin\bin\gcc.exe -c -O2 -IC:\PROGRA~1\plt\./collects/se
tup/..\..\collects\mzlib\..\..\collects\..\include helloprint.c -o .\helloprint.
obj)
[output to ".\helloprint.obj"]
Jim Hollan at surfing /home/plt/collects/mzscheme/examples
$ mzc.exe -v --ld helloprint.dll helloprint.obj -lc
MzScheme compiler (mzc) version 205, Copyright (c) 1996-2003 PLT
"helloprint.obj" "-lc":
link-extension: (C:\cygwin\bin\ld.exe --dll helloprint.obj -lc C:\PROGRA~1\plt\.
/collects/setup/..\..\collects\mzlib\..\..\collects\..\lib\gcc\mzdyn.exp C:\PROG
RA~1\plt\./collects/setup/..\..\collects\mzlib\..\..\collects\..\lib\gcc\mzdyn.o
C:\PROGRA~1\plt\./collects/setup/..\..\collects\mzlib\..\..\collects\..\lib\gcc
\init.o C:\PROGRA~1\plt\./collects/setup/..\..\collects\mzlib\..\..\collects\..\
lib\gcc\fixup.o --base-file c:\DOCUME~1\JIMHOL~1\LOCALS~1\Temp\tmp72.base -e _dl
l_entry at 12 -o helloprint.dll)
C:\PROGRA~1\plt\./collects/setup/..\..\collects\mzlib\..\..\collects\..\lib\gcc\
init.o(.text+0x0):init.cc: multiple definition of `dll_entry at 12'
/usr/bin/../lib/libc.a(d000773.o)(.text+0x0): first defined here
link-extension: command failed