[NSWI004] compiling the program from the quiz

Monika Bošániová monika.bosaniova at gmail.com
Thu Nov 19 02:29:52 CET 2020


Hi,

you should try:
gcc -pthread main.c

Regards
Monika Bošániová

št 19. 11. 2020 o 2:26 Pavel Vigilev <p.vigilev at gmail.com> napísal(a):

> Hi there. Do anyone have a problem with compiling the program from the
> `before`-quiz? gcc on my machine and rotunda's machine complains:
>
> $ gcc main.c/usr/bin/ld: /tmp/ccwFEzMI.o: in function `main':
> main.c:(.text+0x84): undefined reference to `pthread_create'
> /usr/bin/ld: main.c:(.text+0xb6): undefined reference to `pthread_create'
> /usr/bin/ld: main.c:(.text+0xc7): undefined reference to `pthread_join'
> /usr/bin/ld: main.c:(.text+0xd8): undefined reference to `pthread_join'
> collect2: error: ld returned 1 exit status
>
> What is possible to do about it?
>
> Regards
> Pavel Vigilev
>
> _______________________________________________
> NSWI004 mailing list
> NSWI004 at d3s.mff.cuni.cz
> https://d3s.mff.cuni.cz/mailman/listinfo/nswi004
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://d3s.mff.cuni.cz/pipermail/nswi004/attachments/20201119/422368fb/attachment.htm>


More information about the NSWI004 mailing list