使用erlang wx模块会导致错误:检测到的程序和库构建版本之间不匹配

时间:2016-02-09 23:32:05

标签: erlang wxwidgets abi wxerlang

我正在尝试使用erlang的wx模块,但它在所有函数上崩溃并出现以下错误:

Erlang/OTP 18 [erts-7.2] [source-e6dd627] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V7.2  (abort with ^G)
1> wx:demo().
Fatal Error: Mismatch between the program and library build versions detected.
                                                                              The library used 2.8 (no debug,Unicode,compiler with C++ ABI 1009,wx containers,compatible with 2.6),
          and your program used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.6).
                                                                                                                    Aborted (core dumped)

我在Ubuntu 15.10上安装了erlang 18.2和wxWidgets 2.8。

我已经卸载并重新安装了wxWidgets和erlang,它解决了我遇到的第一个错误(在wx模块的每个函数上获得了未定义的函数),但之后我无法找到继续进行的方法。

如何成功运行它?

1 个答案:

答案 0 :(得分:1)

使用两个不同的编译器编译库和Erlang包装器。我不确定你是如何安装其中任何一个的,但最好是使用你在本地使用的任何版本的g ++从源代码构建它们。

如果失败,您可以在编译Erlang包装器之前将this change应用于wxWidgets标头,以强制两个版本之间的兼容性。