RE: FFI C++ Cygwin

2003-01-13 Thread Simon Peyton-Jones
| It is possible to trick ghc into using cygwin's gcc in mingw-mode, | the following steps works for me to do that: Interesting. The only worry is that the run-time system and libraries are all pre-compiled with the mingw gcc. So it's not clear to me that the process Peter outlines will always

Re: FFI C++ Cygwin

2003-01-11 Thread Peter Strand
On Fri, Jan 10, 2003 at 02:11:35PM +0100, Koen Claessen wrote: The C++ stuff compiles fine (using Cygwin's g++). The Haskell stuff compiles just fine (using Win Ghc). However, at linking time I get the following error: - undefined reference to '_impure_ptr' - undefined reference to

Re: FFI C++ Cygwin

2003-01-11 Thread Koen Claessen
Peter Strand wrote: | It is possible to trick ghc into using cygwin's gcc in mingw-mode, | the following steps works for me to do that: | * compile the c++-stuff with g++ -mno-cygwin | * copy /usr/bin/gcc.exe to c:/ghc/ghc-5.04.2/gcc.exe | * rename c:/ghc/ghc-5.04.2/gcc-lib to something else

Re: FFI C++ Cygwin

2003-01-11 Thread Sven Panne
Just a very general remark on this topic: Mixing C and C++ is a highly delicate undertaking, see e.g. item 34 in Scott Meyer's highly recommendable More Effective C++. The linking errors you see are probably related to initialization/shutdown of the C++ runtime system, including construction and