help-octave
[Top][All Lists]
Advanced

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

Re: failed to install .mex file


From: Benjamin Lindner
Subject: Re: failed to install .mex file
Date: Fri, 10 Oct 2008 13:16:14 +0200
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)

Michael Goffioul wrote:
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 stand corrected :)

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.


Do we really need an additional configure check for this?
A simple solution would be to mask the linker flag addtion in a
#ifndef __MINGW32__
   <add the linker flag>
#endif

or a
#ifdef _MSVC_VER
   <add the linker flag>
#endif
pair.

Since it is a specific msvc flag, probably better the second way.
what do you think?

benjamin


reply via email to

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