Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined reference to `timersub' error when running shmoo-cpu-nbody.sh #2

Open
Lissanro opened this issue Jan 11, 2021 · 0 comments
Open

Comments

@Lissanro
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant