Concerning the following problems refered to in the wxHaskell wiki page:
Loading package wxcore-0.10.3 ... : can't load .so/.DLL for: wxc-msw2.6.4-0.10.3 (addDLL: unknown error) (GHCi) see tckiet that I logged: http://hackage.haskell.org/trac/ghc/ticket/2429 sample applications terminate with following error message (Windows). The applicattion failed to initialize properly (0xc0150002). Click OK to terminate the application. your solution might fix the symptoms but not the root cause. The problem appears to be that you have compiled wxHaskell dll with the /MT MS VC compiler option. wxWidgets is compiled with the /MD compiler option by default quoteing MS: "With these options, you can select either single-threaded or multithreaded run-time routines, indicate that a multithreaded module is a dynamic-link library (DLL), and select the retail or debug version of the library." "Note Having more than one copy of the run-time libraries in a process can cause problems, because static data in one copy is not shared with the other copy. To ensure that your process contains only one copy, avoid mixing static and dynamic versions of the run-time libraries. The linker will prevent you from linking with both static and dynamic versions within one .EXE file, but you can still end up with two (or more) copies of the run-time libraries. For example, a dynamic-link library linked with the static (non-DLL) versions of the run-time libraries can cause problems when used with an .EXE file that was linked with the dynamic (DLL) version of the run-time libraries. (You should also avoid mixing the debug and non-debug versions of the libraries in one process.)" the MS VC 2005 patch is not the fix, although it might ameliorate the above problem. I compiled both wxWidgets 2.6.4 and wxCore with MS-VC6 and experienced the above mentioned problem. By changing the compiler option on the wxCore wxc to /MD the above problem was solved. please note that most gnu-win32 projects link adainst MSVCRT.LIB i.e. /MD, so it is advised you change accordingly Compiling using old version of MS-VC: I needed to make the following changes: sound.cpp: EWXWEXPORT(void,wxSound_Stop)(wxSound* self) { #ifdef wxUSE_SOUND return self->Stop(); #endif } ...can't return a void type changed to ... EWXWEXPORT(void,wxSound_Stop)(wxSound* self) { #ifdef wxUSE_SOUND self->Stop(); #endif } then .. defined in wrapper.h ... /* just to ensure that intptr_t exists */ #ifndef _MSC_VER #include /* MSVC-6 defines _MSC_VER=1200 */ #elif _MSC_VER> 1200 #else /* MSVC-6 does not define intptr_t */ typedef int intptr_t; #endif _MSC_VER _________________________________________________________________ Are you paid what you're worth? Find out: SEEK Salary Centre http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau%2Fcareer%2Dresources%2Fsalary%2Dcentre%2F%3Ftracking%3Dsk%3Ahet%3Asc%3Anine%3A0%3Ahot%3Atext&_t=764565661&_r=OCT07_endtext_salary&_m=EXT ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ wxhaskell-devel mailing list wxhaskell-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel