All the samples crash with the following message on run time,
without any window showing (well it's probably trying to initialize a window):
Dyld Error Message
Symbol not found: __ZThn912_N12wxHtmlWindow13GetHTMLWindowEv
Referenced from: /Users/peterhil/Library/Haskell/ghc-7.6.3/lib/wxc-0.91.0.0/lib/libwxc.dylib
Arch: x86_64 (iMac 27" 2008)
OS: Mac OS X 10.9.3
XCode: 5.1.1
C compiler: Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
GHC: 7.6.3
Haskell Platform: haskell-platform-2013.2.0.0
wxWidgets: 2.9.5 (installed with brew install wxmac --devel
)
wxHaskell: 0.91.0.0 (from https://github.com/wxHaskell/wxHaskell.git)
Also see https://sourceforge.net/p/wxhaskell/bugs/93/ (malloc: error for object 0x108c45870: pointer being freed was not allocated). In there, the libraries are compiled with GCC 4.8 from Macports.
This most likely a different problem: the proper wxWidgets library is not found.
Or a different calling convention is used.
I am having the same problem.
OSX 10.9.5
wxwidgets 3.0.0 (compiled on machine)
wxhaskell 0.91.0.0 (compiled on machine)
GHC 7.8.3
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
dyld: Symbol not found: __ZThn920_N12wxHtmlWindow13GetHTMLWindowEv
Referenced from: /Users/michaeljones/Documents/Linear Technology/Code/linti/profiling/lib/x86_64-osx-ghc-7.8.3/wxc-0.91.0.0/libwxc.dylib
Expected in: flat namespace
in /Users/michaeljones/Documents/Linear Technology/Code/linti/profiling/lib/x86_64-osx-ghc-7.8.3/wxc-0.91.0.0/libwxc.dylib
wxwidgets library files are installed in /usr/lib
Using this did not help: export DYLD_LIBRARY_PATH=/usr/local/lib
I assume it is a name mangling problem. Any ideas how to solve it?
I created a .app file via macosx-app lintiScope and ran it. By looking at the exception information, it was clear that all the libs were in place. This might indicate that the problem more likely to be a name mangling issue. Does the GHC 7.8.3 compiler compile an C++/C code wrappers around wxWidgets that might mangle names differently than LLVM and yet somehow survive the linking process without errors?
I got the same error message when I compiled with GCC 5.2.0 (which was introduced in Haskell Patform 7.10.3 for Windows). I solved it by compiling wxWidgets with "-std=gnu++11" and adding cc-options: "-std=gnu++11" to wxc.cabal. Let me know if this solves your problem, so I can close this bug ticket. (cc-options: "-std=gnu++11" is now in the wxHaskell repository, though be it conditional.)