I’m trying to setup of on VSCode but I can’t find a solution for the error I get while trying to compile (build debug or build release):
Compiling OF library for Debug
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
make[2]: *** [makefileCommon/compile.core.mk:233: C:/Users/mmang/Desktop/of_v0.11.2_msys2_mingw64_release/libs/openFrameworksCompiled/lib/msys2/obj/Debug/.compiler_flags] Error 2
make[1]: *** [makefileCommon/compile.core.mk:212: Debug] Error 2
make: *** [C:/Users/mmang/Desktop/of_v0.11.2_msys2_mingw64_release/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:139: Debug] Error 2
The code compiles and runs in the MSYS shell, so I can edit it in VSCode and run it from the shell but it’s kind of annoying and I’m sure it’s something small that could fix it, I just don’t know what.
Going to turn this into a setup guide - but thought I would add here too.
Using VS Code on Windows with msys2 / mingw64.
Note we recommend using the nightly builds of OF from the bottom of the downloads page. The nightly builds have VS Code project files included for all examples.
Step 2: Make sure you have the C:\mingw64 location in your PATH. setx PATH "c:\msys64\mingw64\bin;c:\msys64\usr\bin;%PATH%"
Step 3: Open a Mingw64 shell, cd to the examples folder eg: cd /C/Users/theo/Downloads/OF/examples/3d/assimpExample folder and try building an example with make Release.
If you it compiles successfully you have a working msys2 / Mingw64 setup.
Step 6: Close VS-Code and reopen.
Then open the example VS Code project file for the OF example you want to run. For assimpExample it is: assimpExample.code-workspace.
Step 7: Install the C++ extension if VS Code asks.
Step 8: Build your project.
In the VS Code menu go to Terminal → Run Build Task.... and select Build Release