Building solution and install for OpenVSP - MATLAB API

248 views
Skip to first unread message

Solitary Fortress

unread,
Oct 7, 2022, 1:12:04 AM10/7/22
to OpenVSP

Hi,

I've recently began trying to install the MATLAB API but I’ve gotten stuck in the 5th step outlined in the '2020 OpenVSP AI &MATLAB Integration' Workshop. Step 5 of the workshop says to build solution (I assume by CMAKE) and to build an 'INSTALL'. I assumed the install is done by compiling the VSP_TOP.sln file in visualstudio following the steps from the 'Building OpenVSP from source on windows' workshop however the ppt has an image of a windows powershell installing the devbuild. ¿Can someone provide further guidance as to how to do this step?
I've tried compiling in visualstudio the build solution generated by CMAKE, and although it does create a valid vsp.exe, the MATLAB API does not work as running the 'APITestMain.m' script returns errors.
Any help is much appreciated.

Rob McDonald

unread,
Oct 7, 2022, 1:27:19 AM10/7/22
to OpenVSP
If you've succeeded in building a vsp.exe, then you've made a lot of progress.

I would go back to the CMake step (on VSP) and make sure that CMake managed to locate SWIG and your Matlab installation.  If it failed to find either one, it won't even try to build Matlab bindings.

Rob

Solitary Fortress

unread,
Oct 7, 2022, 2:44:49 PM10/7/22
to OpenVSP

In the CMake step, I set up the configuration mentioned in the workshop which includes the apropriate flags and directories for libraries and the swig. I believe the CMake did manage to locate the SWIG and Matlab as clicking 'configure' in CMake prints out the lines 'Found siwg' followed by the correct directory, and it also prints out the lines 'MATLAB Found, MATLAB MEX will be compiled'. Several warnings popup when i click configure, however these do not stop me from generating the VSP_TOP.sln (which I then compile in VisualStudio2022). I've search on how to fix these warnings but have not come up with any answers :(

I've  annexed a .txt file which shows the output text and warnings generated when i click 'configure' on CMake

CMake_MATLAB_API_warnings.txt

Rob McDonald

unread,
Oct 7, 2022, 4:55:01 PM10/7/22
to OpenVSP
It may be that you build VSP, but not the other things.  In Visual Studio, is there a way to explicitly 'BUILD ALL'?

I don't normally use Windows (and I've never built the MATLAB bindings myself), so I'm a bit unsure the details.

Rob

Solitary Fortress

unread,
Oct 7, 2022, 6:19:58 PM10/7/22
to OpenVSP
Yes it can! That did the trick, I clicked on 'BUILD ALL' in visual studio and sucessfully created the MATLAB API. Currently running the APITestMain.m and everything seems to have worked fine, just had to manually set the path into the MATLAB environment. Thank you so much!

Rob McDonald

unread,
Oct 7, 2022, 7:42:00 PM10/7/22
to ope...@googlegroups.com
Great.  Glad that worked for you.

Rob


--
You received this message because you are subscribed to the Google Groups "OpenVSP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openvsp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openvsp/797d1e36-202b-40c5-9db5-52833663701dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages