This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

CYGWIN and VC++ don't work together


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]