octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #51585] mex.h not compatible with Matlab imple


From: Rik
Subject: [Octave-bug-tracker] [bug #51585] mex.h not compatible with Matlab implementation
Date: Wed, 26 Jul 2017 19:57:00 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

Follow-up Comment #1, bug #51585 (project octave):

Which version of Matlab are you using?  Current versions do not seem to
require the extern declaration.  I'm basing that on some help text that I
could find online
(https://www.mathworks.com/help/matlab/matlab_external/compiling-c-mex-files-with-mingw.html).
 This Stack Overflow article also looked useful
(https://stackoverflow.com/questions/35134314/mex-function-unresolved-external).
 In the resolution, the author doesn't need to use extern declarations at all,
but interestingly you have to worry about file naming conventions a lot.

If you look at the implementation of mex.h that Octave uses, it automatically
accomodates compilation with either C or C++.  See these lines:


#if defined (__cplusplus)
extern "C" {
#endif


I would think that Matlab does something similar now.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51585>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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