If I try to run shmoo-cpu-nbody.sh
I get the following error:
% ./shmoo-cpu-nbody.sh
In file included from nbody.c:4:0:
timer.h: In function ‘GetTimer’:
timer.h:49:3: warning: implicit declaration of function ‘timersub’; did you mean ‘utimes’? [-Wimplicit-function-declaration]
timersub(&timerStop, &timerStart, &timerElapsed);
^~~~~~~~
utimes
/tmp/cco5fkjG.o: In function `GetTimer':
nbody.c:(.text+0x270): undefined reference to `timersub'
/tmp/cco5fkjG.o: In function `main':
nbody.c:(.text.startup+0x148): undefined reference to `timersub'
collect2: error: ld returned 1 exit status
nbody
./shmoo-cpu-nbody.sh: 10: ./shmoo-cpu-nbody.sh: ./nbody: not found
The solution is simple - just remove -std=c99
in ./shmoo-cpu-nbody.sh
.