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

Mex Error Related to jl_options = JL_OPTIONS_HANDLE_SIGNALS_OFF on Julia 1.6.2 #8

Open
GrantHecht opened this issue Sep 18, 2021 · 0 comments

Comments

@GrantHecht
Copy link

GrantHecht commented Sep 18, 2021

I've been playing around with trying to call Julia from MATLAB with Julia v1.6.2 on Windows using the Microsoft Visual C++ 2019 compiler and started running to the mex error:

Error using mex
   Creating library C:\Users\granthec\.julia\dev\Mex.jl\mexjulia\mexjulia.lib and object
   C:\Users\granthec\.julia\dev\Mex.jl\mexjulia\mexjulia.exp
mexjulia.obj : error LNK2019: unresolved external symbol __imp_jl_options referenced in function mexFunction
C:\Users\granthec\.julia\dev\Mex.jl\mexjulia\mexjulia.mexw64 : fatal error LNK1120: 1 unresolved externals

I was eventually able to compile the mex function successfully editing mexjulia.cpp to either:

//jl_options.handle_signals = JL_OPTIONS_HANDLE_SIGNALS_OFF;

or

//jl_options.handle_signals = JL_OPTIONS_HANDLE_SIGNALS_OFF;
jl_options_t jl_options;
jl_options.handle_signals = JL_OPTIONS_HANDLE_SIGNALS_OFF;

I'm not super familiar with C++ and assume both of these options likely will result in undesirable behavior but I wanted to document the error I was running into and the quick fix that I used.

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

1 participant