Building a dynamic library with haskell and using it from C++

前端 未结 1 413
臣服心动
臣服心动 2021-02-07 07:14

I want to build a dynamic library containing haskell functions. I work on linux and want to call this dynamic library from C++ code.

I used the example at http://wiki.py

相关标签:
1条回答
  • 2021-02-07 07:26

    Probably easier than wrestling with g++ is letting ghc do the work,

    ghc main.cpp -o hithere -L. -lTest -lstdc++

    did the job for me after creating the shared lib the way you did. I have tested it with 7.2.2 and 7.0.2, both worked here.

    0 讨论(0)
提交回复
热议问题