I believe there might be an issue with the current version of oF which I have installed from the nightly build as the other build has an error while building,
I have installed v20230405_msys2_mingw64_nightly and have successfully followed the instructions provide to install using msys2 found here
After completing everything, I then ran the script located in C:/of/scripts/mysys2 called buildAllExamples.sh
This works! No problems whatsoever, I can even run the example applications just by double clicking them which(I believe) means that my path variables are all setup properly.
However I have encountered a tricky issue that I cannot find the solution for. My Build Tasks do not work.
- I firstly created a project using the ProjectGenerator with the Advanced options tick enabled and selected the template Visual Studio Code and generated a project named testSketch2 I then opened the project from the testSketch2.code-workspace file that was created inside of
C:/of/apps/myApps/testSketch2
After launching I proceeded to the next steps as detailed below:
- I created a terminal profile for MSYS and set it to default which does work I went through this forum post to find that this was needed and have move away from the deprecated method shown, and instead created a new terminal profile for MSYS bash.
However when I run the build task: Build DEBUG I get the following output:
* The terminal process "C:\msys64\usr\bin\bash.exe '--login', '-i', '-c', 'make Debug -j -s 2>&1 || exit 1'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
When running Build RELEASE I get the following:
* Executing task in folder testSketch2: make -j -s 2>&1 && make RunRelease
make: *** No targets specified and no makefile found. Stop.
* The terminal process "C:\msys64\usr\bin\bash.exe '--login', '-i', '-c', 'make -j -s 2>&1 && make RunRelease'" terminated with exit code: 2.
* Terminal will be reused by tasks, press any key to close it.
if I launch MYSY64 and navigate to C:\of\apps\myApps\testSketch2
and run “make” I get the following output:
Sam@DESKTOP-I3MCUMR MINGW64 /c/of/apps/myApps/testSketch2
$ make
find: ‘C:of/libs/openFrameworksCompiled/project/msys2/config.*.mk’: No such file or directory
Compiling OF library for Release
make[1]: Entering directory '/c/of/apps/myApps/testSketch2'
make[1]: *** C:of/libs/openFrameworksCompiled/project/: No such file or directory. Stop.
make[1]: Leaving directory '/c/of/apps/myApps/testSketch2'
make: *** [C:\of/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:125: Release] Error 2
Similarly if I try and run make Debug iwth or without the args in tasks.json I get the following output:
Sam@DESKTOP-I3MCUMR MINGW64 /c/of/apps/myApps/testSketch2
$ make Debug -j -s 2>&1
find: ‘C:of/libs/openFrameworksCompiled/project/msys2/config.*.mk’: No such file or directory
Compiling OF library for Debug
make[1]: *** C:of/libs/openFrameworksCompiled/project/: No such file or directory. Stop.
make: *** [C:\of/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:139: Debug] Error 2
I believe the error lies in the output of running make, as you can see in the following line:
make[1]: *** C:of/libs/openFrameworksCompiled/project/: No such file or directory. Stop.
make is attempting to access the folder, however, the C: does not include a / and thus does not exist?
Also something else I have seen is that in my c_cpp_properties.json
under the Win32 tree there are several included paths that are not present in my current project, I believe this may just be libraries only required if you use addons with the ProjectGenerator? I am not sure, I have attached a screen capture of all the libraries underlined indicating they are necessary. I do not believe that this is what is causing my earlier problem, but I think providing all potentially relevant information is important.
Can anyone perhaps point me towards what I may have done wrong or potential fixes? Thank you!
Edit: Something I think is interesting which I have just tested is that if I create a folder called 1testing(to make it execute first) and then copy the testSketch2 file into this new folder and run ./buildAllExamples.sh the build succeeds and runs. Here is the output below incase it might be needed:
Sam@DESKTOP-I3MCUMR MINGW64 /c/of/scripts/msys2
$ ./buildAllExamples.sh
Building All Examples
=================================================================
category 1testing
=================================================================
Building 1testing/testSketch2
[Success]
-----------------------------------------------------------------
=================================================================
category 3d
=================================================================
Building 3d/3DModelLoaderExample
I canceled the script after reaching this point and have tested the generated exe file and it is working as expected.