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

error while buliding #1

Closed
UTrosh opened this issue Jul 6, 2024 · 3 comments
Closed

error while buliding #1

UTrosh opened this issue Jul 6, 2024 · 3 comments

Comments

@UTrosh
Copy link

UTrosh commented Jul 6, 2024

cc -Wall -Wextra -g proxyrot.c -c -o proxyrot.o
proxyrot.c: In function 'work':
proxyrot.c:408:9: error: a label can only be part of a statement and a declaration is not a statement
408 | proxy_info *proxy = get_next_proxy();
| ^~~~~~~~~~
make: *** [Makefile:9: proxyrot.o] Error 1

@sloweax
Copy link
Owner

sloweax commented Jul 6, 2024

Can you provide the output of cc -v?

On gcc running make CC=gcc CFLAGS=-std=gnu11 should build fine

I will be working for it to be compatible with at least -std=c11 in the meantime

@JReming85
Copy link

JReming85 commented Sep 16, 2024

Not sure what was changed, but getting this error when trying to build on Ubuntu 20.04.6 LTS with gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0

/opt/proxyrot# make
cc -Wall -Wextra -g -lpthread proxyrot.o util.o socks5.o proxy.o -o proxyrot
/usr/bin/ld: proxyrot.o: in function `main':
/opt/proxyrot/proxyrot.c:153: undefined reference to `pthread_create'
/usr/bin/ld: /opt/proxyrot/proxyrot.c:158: undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
make: *** [Makefile:12: proxyrot] Error 1

@sloweax
Copy link
Owner

sloweax commented Sep 17, 2024

Should be fixed in 829bb3a

Closing due to inactivity

@sloweax sloweax closed this as completed Sep 17, 2024
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