cabal install wx Missing C library

老子叫甜甜 提交于 2020-02-03 08:53:12

问题


Env:

  • OS: feodra 16
  • haskell-platform
  • wxGTK-devel
  • ghc 7.0.4

I am trying to install wxHaskell with

cabal install wx

Then these errors are given.

Missing dependencies on foreign libraries: * Missing C libraries: wx_baseu-2.8, wx_baseu_net-2.8, wx_baseu_xml-2.8, wx_gtk2u_core-2.8, wx_gtk2u_adv-2.8, wx_gtk2u_html-2.8, wx_gtk2u_qa-2.8, wx_gtk2u_xrc-2.8, wx_gtk2u_aui-2.8, wx_gtk2u_richtext-2.8, wx_gtk2u_media-2.8, wx_gtk2u_stc-2.8, wx_gtk2u_gl-2.8

And these libraries actually exist in /usr/lib I type following in terminal

ls libwx*.so

and found libs:

  • libwx_baseu-2.8.so
  • libwx_gtk2u_aui-2.8.so
  • libwx_gtk2u_gl-2.8.so
  • ......

I tried cabal install wx --exteral-lib-dirs=/usr/lib , but still no luck.


回答1:


I have figured out the issue (and it only took me the best part of a month :))--you need to have g++ installed on your machine. You can install it with sudo yum install gcc-c++.




回答2:


I am not a wx expert, but you likely additionally need the C headers for these libraries. Look for your distribution's "development" package for these libraries; in many distributions, these packages are named the same as the library package itself, but with "-dev" added at the end of the name.




回答3:


sudo apt-get install libwxgtk-media3.0-dev

works for me




回答4:


I don't have a solution, but I hit the exact same problem last night on a fresh Debian Wheezy install, which makes me think that it might be a packaging problem with the wx in cabal.



来源:https://stackoverflow.com/questions/9756088/cabal-install-wx-missing-c-library

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