Discussion:
[Swig-devel] Swig+Scilab on windows/OSX do not work
Ian Bell
2014-10-28 20:53:45 UTC
Permalink
Simon,

I tried to compile my code using swig+scilab on windows, but it seems the
headers are not included with the binary release. Or at least, if they
are, they are in a funny location. Can you fill me in on what is going on?

Also, I can't compile on OSX, here is the traceback, I can provide more
info if necessary:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1560:46:
error: expected unqualified-id
inline _LIBCPP_INLINE_VISIBILITY float round(float __x)
_NOEXCEPT {return roundf(__x);}
^
/Applications/scilab-5.5.1.app/Contents/MacOS/include/scilab/core_math.h:60:20:
note: expanded from macro 'round'
#define round(a) (int)(((a)<0.0)?(a)-.5:(a)+.5)
^
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/build/CoolPropSCILAB_wrap.cxx:3449:
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/include/DataStructures.h:11:
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/include/CoolPropTools.h:11:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1560:46:
error: expected ')'
/Applications/scilab-5.5.1.app/Contents/MacOS/include/scilab/core_math.h:60:20:
note: expanded from macro 'round'
#define round(a) (int)(((a)<0.0)?(a)-.5:(a)+.5)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1560:46:
note: to match this '('
/Applications/scilab-5.5.1.app/Contents/MacOS/include/scilab/core_math.h:60:19:
note: expanded from macro 'round'
#define round(a) (int)(((a)<0.0)?(a)-.5:(a)+.5)
^
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/build/CoolPropSCILAB_wrap.cxx:3449:
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/include/DataStructures.h:11:
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/include/CoolPropTools.h:11:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1561:46:
error: expected unqualified-id
inline _LIBCPP_INLINE_VISIBILITY long double round(long double __x)
_NOEXCEPT {return roundl(__x);}
^
/Applications/scilab-5.5.1.app/Contents/MacOS/include/scilab/core_math.h:60:20:
note: expanded from macro 'round'
#define round(a) (int)(((a)<0.0)?(a)-.5:(a)+.5)
^
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/build/CoolPropSCILAB_wrap.cxx:3449:
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/include/DataStructures.h:11:
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/include/CoolPropTools.h:11:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1561:46:
error: expected ')'
/Applications/scilab-5.5.1.app/Contents/MacOS/include/scilab/core_math.h:60:20:
note: expanded from macro 'round'
#define round(a) (int)(((a)<0.0)?(a)-.5:(a)+.5)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1561:46:
note: to match this '('
/Applications/scilab-5.5.1.app/Contents/MacOS/include/scilab/core_math.h:60:19:
note: expanded from macro 'round'
#define round(a) (int)(((a)<0.0)?(a)-.5:(a)+.5)
^
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/build/CoolPropSCILAB_wrap.cxx:3449:
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/include/DataStructures.h:11:
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/include/CoolPropTools.h:11:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1566:1:
error: expected unqualified-id
round(_A1 __x) _NOEXCEPT {return round((double)__x);}
^
/Applications/scilab-5.5.1.app/Contents/MacOS/include/scilab/core_math.h:60:20:
note: expanded from macro 'round'
#define round(a) (int)(((a)<0.0)?(a)-.5:(a)+.5)
^
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/build/CoolPropSCILAB_wrap.cxx:3449:
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/include/DataStructures.h:11:
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/include/CoolPropTools.h:11:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1566:1:
error: expected ')'
/Applications/scilab-5.5.1.app/Contents/MacOS/include/scilab/core_math.h:60:20:
note: expanded from macro 'round'
#define round(a) (int)(((a)<0.0)?(a)-.5:(a)+.5)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1566:1:
note: to match this '('
/Applications/scilab-5.5.1.app/Contents/MacOS/include/scilab/core_math.h:60:19:
note: expanded from macro 'round'
#define round(a) (int)(((a)<0.0)?(a)-.5:(a)+.5)
^
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/build/CoolPropSCILAB_wrap.cxx:3449:
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/include/DataStructures.h:11:
In file included from
/Users/Ian/slave/SWIG-Scilab-OSX/build/include/CoolPropTools.h:11:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1579:46:
error: call to 'scalbln' is ambiguous
scalbln(_A1 __x, long __y) _NOEXCEPT {return scalbln((double)__x, __y);}
^~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1573:46:
note: candidate function
inline _LIBCPP_INLINE_VISIBILITY float scalbln(float __x, long
__y) _NOEXCEPT {return scalblnf(__x, __y);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1574:46:
note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long double scalbln(long double __x,
long __y) _NOEXCEPT {return scalblnl(__x, __y);}
^
2 warnings and 7 errors generated.

Kind Regards,
Ian

Loading...