Please try locating the command line (make.exe <…>) in the VisualGDB build window. It will have a different color than the rest of the log. Then right-click on it and select “Dump Command Line to a Batch File”.
This will create a batch file with the exact command line used by VisualGDB (including the environment variables). Running it should yield the same results as building the project with VisualGDB. You can then try simplifying the batch file (e.g. removing some environment variables) to see what causes the issue you observed.
Another question: should the Makefile work out of the box in this way in Linux environments?
I have a Ubuntu VM in my computer running through the WSL. I used all of the commands in the Ubuntu environment (changing them to the respective Linux commands), but I’m getting some errors of files not being found, like:
arm-eabi-g++.exe: fatal error: no input files
arm-eabi-g++.exe: error: /path/to/my/file/my_file.cpp: No such file or directory (the path exists, that’s why this error is weird)
Does it need some kind of tweaking to get the build done on a Linux environment?
Sorry, the only supported way to use the VisualGDB-generated Makefile is by building it from VisualGDB. Given the flexibility of GNU Make, you should be able to tweak it to work in other environments, but this is something to do at your own risk, since it involves too many parameters that are outside VisualGDB’s control.