|
From: | Benjamin Lindner |
Subject: | Re: failed to install .mex file |
Date: | Thu, 09 Oct 2008 18:00:28 +0200 |
User-agent: | Thunderbird 2.0.0.14 (Windows/20080421) |
joyce wrote:
hi all,I'm using OCTAVE 3.0.2 under windows XP and want to install sundials 2.3.0 into it. Now I have done installation and got the MEX files, however, it gave such error whenI used it:error: library initialization routine failed: d:\octave\3.0.2_gcc-4.3.0\sundials\sundialsTB\cvodes\cvm\cvm.mex error: failed to install .mex file function `cvm' error: `cvm' undefined near line 39 column 1 ...I tested other codes as well.I find that if the file is OCT then OCTAVE can run it while if it produces *.mex file then OCTAVE considers it as an undefined m file.Any one could help me? Many thanks,
I can confirm this effect, it's a bug in mkoctfile.I see that for mex files a "-Wl,-export:mexFunction" is added to linker flags. According to Gnu ld documentation, there is no "-export" option, but it is interpreted as "-e xport:mexFunction" which defines "xport:mexFunction" as alternative DLL entry point.
I can probably guess the intention why this was added in the first place, but it firstly is a wrong ld flag, and secondly it is not required for mingw builds, since the linker has --export-all-symbols set anyway.
This will only affect msvc and mingw builds, so Michael, can we skip this flag altogether? Or should I disable it for mingw32 builds only?
I'll provide the according patch to mkoctfile.cc.in benjamin
[Prev in Thread] | Current Thread | [Next in Thread] |