Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation problem #1

Open
lfrank opened this issue Nov 20, 2018 · 3 comments
Open

Compilation problem #1

lfrank opened this issue Nov 20, 2018 · 3 comments
Assignees

Comments

@lfrank
Copy link

lfrank commented Nov 20, 2018

Trying out the latest version on OSX Mojave:

cd matlab
compile_mex_isosplit5
Building with 'Xcode Clang++'.
Warning: Error in compilation. Make sure you are in the correct directory.
In compile_mex_isosplit5 (line 4)
Error using mex
/Users/loren/Src/isosplit5/matlab/./_mcwrap/mcwrap_isosplit5_mex.cpp:78:30: error: non-constant-expression
cannot be narrowed from type 'int' to 'mwSize' (aka 'unsigned long') in initializer list [-Wc++11-narrowing]
mwSize dims[] = { 1, input_N };
^~~~~~~
/Users/loren/Src/isosplit5/matlab/./_mcwrap/mcwrap_isosplit5_mex.cpp:78:30: note: insert an explicit cast to
silence this issue
mwSize dims[] = { 1, input_N };
^~~~~~~
static_cast( )
1 error generated.

Error in compile_mex_isosplit5 (line 2)
mex ./_mcwrap/mcwrap_isosplit5_mex.cpp ./isosplit5.cpp ./isocut5.cpp ./jisotonic5.cpp -output
./isosplit5_mex

@ahbarnett
Copy link
Collaborator

Hi Loren, I get a warning for this on linux gcc 5.4 too, but it compiles. Something to do with C++11 compliance of clang.
I can get the warning to go away by inserting (mwSize) in line 78 of _mcwrap/mcwrap_isosplit5_mex.cpp
as follows:
mwSize dims[] = { 1, (mwSize)input_N };
I don't have a mac w/ Matlab on it available to try this. Jeremy's out for a couple of days, so he may not get to this before the hols. If the above doesn't work, let me know - Alex

@lfrank
Copy link
Author

lfrank commented Nov 20, 2018

That works; thanks... Did you happen to update the source code?

@ahbarnett ahbarnett assigned ahbarnett and magland and unassigned ahbarnett Nov 20, 2018
@ahbarnett
Copy link
Collaborator

Great. I'll let Jeremy do that, since it involves his mcwrap package too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants