Statically link a haskell program that uses C++ wrapper library

怎甘沉沦 提交于 2019-12-05 09:02:39

The problem boils down to the fact that gcc doesn't actually have libstdc++, or the other core c++ libraries available to it, but g++ does.

Asking ghc to use g++ instead of gcc for linking should do the trick. Add the following to your cabal file as a parameter under ghc-options: -pgml g++. It sets the linking program to g++ which should allow the system linker to find the libraries it needs.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!