Using erlang wx module results in an error: Mismatch between the program and library build versions detected

565 views Asked by At

I am trying to use erlang's wx module, but it crashes on all of the functions with the following error:

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)

I'm on Ubuntu 15.10 with erlang 18.2 and wxWidgets 2.8 installed.

I already uninstalled and reinstalled both wxWidgets and erlang, which solved the first error I had (getting undefined function on every function of the wx module), but after that I couldn't find a way to proceed.

What should I do to successfully run it?

1

There are 1 answers

2
VZ. On BEST ANSWER

The library and the Erlang wrappers were compiled using two different compilers. I'm not sure how did you install either of them, but the best is to build them both from sources using whichever version of g++ you have locally.

Failing that, you could apply this change to your wxWidgets headers before compiling Erlang wrapper to force compatibility between the two versions.