On Thu, Oct 9, 2008 at 6:00 PM, Benjamin Lindner <address@hidden> wrote:
I can confirm this effect, it's a bug in mkoctfile.
I wouldn't call it a bug, but simply the fact that mkoctfile
is designed first to work with VC++, and not MinGW :-)
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.
Here, you assume that ld will be used as the linker, which is
of course not always the case with VC++. This flag is needed
for VC++. So mkoctfile should be adapted to work with MinGW.
The best solution would probably be to add some configure
check and use an additional substituted variable to take care
of it.