Closed jkozlowski closed 9 years ago
Looks like it is difficult to do, not knowing what I'm doing.
Currently I can't get past this linking error: Undefined symbols for architecture x86_64: "___emutls_get_address", referenced from: _clr in c.o _krr in c.o _orr in c.o _m5 in c.o _w1 in c.o _w0 in c.o _g8 in c.o ... ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *\ [test] Error 1
Trying to link to KDB's c.o from Golang and having same error on OSX 10.10 (tried gcc 4.3 till 4.9)
http://stackoverflow.com/questions/7885246/what-is-the-emutls-get-address-symbol <- just saw this.
I didn't have time to test this, though...
The idea is to be able to compare the benchmark the pure Haskell implementation to the c implementation.
I also want to learn to bind to C from Haskell, as an exercise.
See https://hackage.haskell.org/package/language-c-inline. But might need to start with c2hs initially, since there are more resources for this: http://blog.ezyang.com/2010/06/setting-up-cabal-the-ffi-and-c2hs/.