-
Notifications
You must be signed in to change notification settings - Fork 467
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 build issue on Windows #735
Conversation
…ction compile commands.
Codecov Report
@@ Coverage Diff @@
## master #735 +/- ##
=======================================
Coverage 22.51% 22.51%
=======================================
Files 167 167
Lines 19146 19146
=======================================
Hits 4311 4311
Misses 14835 14835 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@agodemar would you mind checking if the S-Function compiles again with the Windows command line from |
@bcoconni I have merged your recent fix and let you know if the Matlab v2022b compiles |
@bcoconni Then I successfully compiled both JSBSim.exe and JSBSim_SFunction.mexw64 on Windows: Finally, I copied all the necessary files in JSBSim root directory and successfully tested the example Simulink model Please guide me in the finale step: take the release version incorporating this latest feature and compile the M-file |
Thanks @agodemar for testing the procedure to build the S-Function with CMake.
For this part, I guess you'll need to follow the steps described in our MATLAB README (which was written from your input in the issue #491 😊). Of course, you can skip the part about downloading and installing JSBSim from the Windows installer |
@bcoconni you mean that these modification is already bundled in the current setup package downloadable from the release section? Don't we have to wait that the CI workflow makes a new package? |
@agodemar No, I meant to ask if you could build the S-Function from scratch as per the instructions from our MATLAB README. This is a different means to build the S-Function than using CMake. The point is to check that the default parameters of the file |
…ction compile commands. (JSBSim-Team#735) I will be checking this new features on my Windows box, with Matlab v2022b
As reported by @fkg-ctsi (see below), the build of the MATLAB S-function is broken since we allowed JSBSim to be built as a DLL. In order to avoid the build failing when JSBSim is compiled as a static library, the flag
JSBSIM_STATIC_LINK
is now passed to themex
compiler.Discussed in #734
Originally posted by fkg-ctsi September 23, 2022
Hi there!
Firstly, thank you so much for all of the continued development and support over the years. This project has really helped make this industry more accessible!
I have a (likely) noob question re: compiling the S-Function using MEX.
I've been following the guide, and when I get to the step to compile with mex, I get a large link error dump.
Here is a snippet:
For reference, I am using VS Community 2019, and Matlab/Simulink 2022b (Really hoping that this isn't the issue)
Admittedly, I am a MEX noob and only functional in C++, but would really appreciate a nudge in where to start investigating a path forwards.
Thanks!