You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.
I am able to use rust to create a dll, which I renamed test2.mexw64. I am then able to drop it into a folder and call the function from MATLAB. The warning is intentional and programmed in Rust.
src\lib.rs
#![allow(non_snake_case)]#![allow(unused_variables)]externcrate mex_sys;use mex_sys::mxArray;use mex_sys::mexWarnMsgIdAndTxt;use std::ffi::CString;#[no_mangle]pubextern"C"fnmexFunction(nlhs:::std::os::raw::c_int,plhs:*mut*mutmxArray,nrhs:::std::os::raw::c_int,prhs:*mut*mutmxArray){let id = CString::new("MATLAB:yprime:divideByZero").unwrap();let msg = CString::new("Division by zero!\n").unwrap();unsafe{mexWarnMsgIdAndTxt(id.as_ptr(), msg.as_ptr());}}
I am able to use rust to create a dll, which I renamed
test2.mexw64
. I am then able to drop it into a folder and call the function from MATLAB. The warning is intentional and programmed in Rust.src\lib.rs
Cargo.toml
build.rs
.cargo\config
The text was updated successfully, but these errors were encountered: