Compiling drivers under Cygwin

Nicolas Charpentier ncharpentier@REDACTED
Tue Oct 5 23:36:13 CEST 2004


Vlad Dumitrescu wrote:

> Hi,
> 
> I remember someone mentioned thay could compile Windows dynamic drivers 
> under Cygwin and it worked. I think it was Rudolph van Graan.
> 
> If I try to do it (with the simple driver from the interoperability 
> tutorial) erl just crashes with a stackdump.
> 
> Could anyone point me in the right direction please? Should it work, or 
> are only VC generated dlls supported?
> 
> Thanks in advance,
> Vlad
> 
> 
Hi,

Vlad Dumitrescu wrote:

 > Could anyone point me in the right direction please? Should it work, 
or are only VC generated dlls supported?


I succeed to compile a driver using gcc from Cygwin. To avoid the 
dependency with cygwin.dll, I compile with the option '-mno-cygwin' to 
use the mingw librairies.

My compilation orders are
'g++ -c -mno-cygwin -fpic -shared -I$ERL_INCLUDE_CYGWIN_PATH' for all 
sources.
'g++ -mno-cygwin -fpic -shared -oXXX.dll all_dot_o -llibrary_to_drive'


Hope that this could help you.
Regards,
Nicolas Charpentier




More information about the erlang-questions mailing list