How do I link a .DLL into my C program on Win32?
Chris Marshall
ninethirtysix@hotmail.com
Thu Jun 28 09:34:00 GMT 2001
Hi!
I'm just getting started with using the GCC compiler, and I have to use
functions that I don't have the source code for. I've been given a .DLL and
a .H file.
I am using the most recent version of the Cygwin GCC compiler on a
Windows2000 platform.
First I tried:
gcc -I. hello.c
and I got:
$ gcc -I. hello.c
/cygdrive/c/DOCUME~1/fdent/LOCALS~1/Temp/ccHKaOcA.o(.text+0xdf):hello.c:
undefined reference to `PSMsgConnect'
So then I tried:
gcc -I. -l./psmsg.dll hello.c
$ gcc -I. -l./psmsg.dll hello.c
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld:
cannot find -l./psmsg.dll
collect2: ld returned 1 exit status
And the DLL exists in the current directory.
I know that somehow I've got to tell GCC about the existence of the stuff
inside .DLL ... How do I do that?
Please reply directly to this email address as I am not subscribed to the
list.
Thanks!
Chris
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
More information about the Gcc-help
mailing list