CYGWIN and VC++ don't work together

Gilad Bed Dor gilad.ben-dor@alcatel.co.il
Tue Apr 4 10:05:00 GMT 2000


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



More information about the Cygwin mailing list