opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
779 stars 311 forks source link

Compiling Matlab bindings #2637

Closed antoinefalisse closed 4 years ago

antoinefalisse commented 4 years ago

@aymanhab, I am having troubles building the Matlab bindings with the latest version of opensim-core. I am working with MSVC2015 and have tried different versions of SWIG (3.0.12 and 4.0.1) and JDK (8u231 and 10).

When I build Java - osimJavaJNI, I get:

Unable to open file C:\Users\u0101727\Documents\Visual Studio 2015\Projects\opensim-fork\opensim-core-build\Bindings\Java\OpenSimJNI\src\common\SWIGTYPE_p_std__functionT_void_fOpenSim__Component_const_p_SimTK__State_const_R_std__string_const_R_SimTK__VecT_2_SimTK__VecT_3_double_1_t_1_t_RF_t.java: No such file or directory

Any idea about what could go wrong? Building the Python bindings works fine. Thanks

aymanhab commented 4 years ago

@antoinefalisse Likely this has to do with the very long file name generated, can you specify a shorter build path/directory name? We use swig 3.0.9 and do not support swig 4.0+ yet

aymanhab commented 4 years ago

Python doesn't generate a file per class so will not have this issue. Note that this is not a Java compilation issue (JDK) or C++ compilation issue (VS) it's more trying to load/open a file that may actually exist!

antoinefalisse commented 4 years ago

Thanks @aymanhab, that was an easy one.