[Top][All Lists]

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

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

From: Mike Miller
Subject: Re: msys, swig, cmake, and undefined octave dll routines
Date: Tue, 3 Jan 2017 12:37:17 -0800
User-agent: NeoMutt/20161126 (1.7.1)

On Tue, Jan 03, 2017 at 13:09:48 -0700, Brad Bell wrote:
> 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
> > 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.

I'm not sure about this one, might be a different gcc / toolchain

> 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.

Python is entirely C, so it shouldn't be affected at all by this.

> > 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 agree, that would be a nice way to distribute Octave, if it isn't done
already. The purpose of the official installer is to provide users a
simple self-contained install to just use Octave.

Users such as yourself who want a more full-featured development
environment should probably use a GNU distribution, or if you are stuck
with Windows for some reason, a distribution like Cygwin, MSYS, or
MSYS2, which would hopefully provide Octave built for that distribution
or the ability to build Octave yourself.

Mixing the official binary with a separate distribution and attempting
to use them together is almost certainly a recipe for trouble, and well
outside the scope of what we are trying to provide.

Instead, you might try building Octave using the mxe-octave project with
the --enable-native-build option (, or
otherwise building Octave from source in your MinGW environment.


reply via email to

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