This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
CYGWIN and VC++ don't work together
- To: "cygwin contact" <cygwin at sourceware dot cygnus dot com>
- Subject: CYGWIN and VC++ don't work together
- From: "Gilad Bed Dor" <gilad dot ben-dor at alcatel dot co dot il>
- Date: Tue, 4 Apr 2000 19:04:05 +0200
Hello.
I wrote a Dll in CYGWIN.
I than tried to do LoadLibrary, from a VC++ project.
the LoadLibrary failed with GetLastError=998.
I tried to switch places : Wrote a Dll in VC++,
But than the CYGWIN's LoadLibrary failed.
Wow can I use CYGWIN's Dlls, from VC++ ?
e.g:
the file :
#include "windows.h"
BOOL WINAPI TestStart( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved )
{
return TRUE;
}
void __stdcall Test( int *Ptr )
{
*Ptr = 123456;
}
I compiled with "gcc -c" (not c++), than linked according to the
documentation :
$(LD) -s --base-file BASEFILE --dll -o DLLNAME OBJS LIBS -e ENTRY
$(DLLTOOL) --as=$(AS) --dllname DLLNAME --def DEFFILE \
--base-file BASEFILE --output-exp EXPFILE
$(LD) -s --base-file BASEFILE EXPFILE -dll -o DLLNAME OBJS LIBS -e
ENTRY
$(DLLTOOL) --as=$(AS) --dllname DLLNAME --def DEFFILE \
--base-file BASEFILE --output-exp EXPFILE
$(LD) EXPFILE --dll -o DLLNAME OBJS LIBS -e ENTRY
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com