help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: msys, swig, cmake, and undefined octave dll routines


From: Brad Bell
Subject: Re: msys, swig, cmake, and undefined octave dll routines
Date: Tue, 3 Jan 2017 13:09:48 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 01/03/2017 10:47 AM, Mike Miller wrote:
... snip ...
... snip ...
The python version works under mingw-msys, but I am having some trouble
linking the octave version. For example, I get the message
      swig_exampleOCTAVE_wrap.cxx:912: undefined reference to `
      octave_value::octave_value(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, char)'
... snip ...
Try building your project with -D_GLIBCXX_USE_CXX11_ABI=0 (see
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html for
more information). Of course, this may conflict with swig or other
libraries that were built with mingw's gcc 5 using only the new ABI.
... snip ...
It seems you are correct here in that there are longer undefined references when I add the flag during compilation. Instead the following error occurs at run time: The procedure entry point __gmpn_cnd_add_n could not be located in the dynamic link library
c:\Octave\Octave-4.0.3\bin\libhogweed-2.5.dll.

One interesting point is that the python-2.7.2 libraries link and run fine with the -D_GLIBCXX_USE_CXX11_ABI=0 flag on the compile lines.

If that also doesn't work, then you may want to try building swig itself
using only the toolchain provided with Octave. Or you may want to try
building Octave natively under your mingw environment instead of relying
on the official cross-build that may have been built with an
incompatible toolchain.

I was hoping that I could just use the normal distributions (so that it would be easier for users). It would be nice if octave was available under the
MinGW Installer.



I should mention that I had to change two include instructions that seem
like typos to me
(because the corresponding files could not be found).
To be specific, in oct.h I changed
     #include <config.h>
to
     #include "config.h"
and in comment-list.h I changed
     #include <base-list.h>
to
     #include "base_list.h"
Thanks, these are already fixed in Octave 4.2.0 (which may or may not
yet work with swig).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]