I have a project with the following structure:
prj
prj.cbp
src
main.c
...
build
mingw
Makefile
In the Project->Properties I set build\mingw as the Execution directory. In the Build options I set $make -f $makefile as command for Build project/target.
The compilation works well.
If there's a compilation error, the compiler outputs something similar (in Build log):
../../src/main.c: In function 'app_init':
../../src/main.c:459:31: error: expected ';' before numeric constant
app_trigger_signal_on_GPIO 7);
^
mingw32-make.exe: *** [Makefile:1120: output/objs/qcli/pal.o] Error 1
In the Build messages window I see the row:
build\mingw\src\main.c|459|error: expected ';' before numeric constant|
Of course, when I double click on this row, C::B doesn't open the relevant file, because it is src/main.c (relative to project file) and not build\mingw\src\main.c.
What is the solution of this problem?
I tried to set Execution directory to . (the same folder of project file), but at the moment make works only if launched in the same directory of Makefile (build/mingw).