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

Compilation instructions incorrect for Linux #3

Closed
nivex opened this issue Feb 8, 2015 · 3 comments
Closed

Compilation instructions incorrect for Linux #3

nivex opened this issue Feb 8, 2015 · 3 comments
Assignees

Comments

@nivex
Copy link

nivex commented Feb 8, 2015

Following instructions in readme:

kjotte@daedalus:~/git/redsea$ gcc -o rtl_redsea -lm rtl_redsea.c
rtl_redsea.c: In function ‘main’:
rtl_redsea.c:91:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for (int iq=0;iq<=1;iq++) {
     ^
rtl_redsea.c:91:5: note: use option -std=c99 or -std=gnu99 to compile your code

Code compiles correctly with command:
kjotte@daedalus:~/git/redsea$ gcc -std=gnu99 -o rtl_redsea rtl_redsea.c -lm

@windytan
Copy link
Owner

windytan commented Feb 8, 2015

Thanks!

@parameter-pollution
Copy link

You added -std=gnu99, but you didn't move the "-lm" parameter to the end of the command as nivex did. If it's not at the end i get linker errors on my linux box.
Great tool btw.

@windytan
Copy link
Owner

windytan commented Feb 8, 2015

Right, fixed now.

@windytan windytan closed this as completed Feb 9, 2015
@windytan windytan self-assigned this Feb 11, 2015
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

3 participants