[Anjuta-list] How to build a project with threads



Hi everybody,
I am designing my first project with Anjuta; it contains one include file and 6 source code files. Every source code file compiles correctly, but when I try to build the whole project, Anjuta returns me the next messages:

/home/miguel/Projects/ffluxd/src/apiflujos.c:196: undefined reference to `pthread_cancel' apiflujos.o(.text+0x397):/home/miguel/Projects/ffluxd/src/apiflujos.c:204: undefined reference to `pthread_kill'
Reconfig.o(.text+0x34): In function `Reconfigurar':
/home/miguel/Projects/ffluxd/src/Reconfig.c:42: undefined reference to `pthread_create'
Parar.o(.text+0x34): In function `Parar':
/home/miguel/Projects/ffluxd/src/Parar.c:43: undefined reference to `pthread_create' Parar.o(.text+0x74):/home/miguel/Projects/ffluxd/src/Parar.c:52: undefined reference to `pthread_join'
flujo.o(.text+0xef): In function `EjecutaFlujo':
/home/miguel/Projects/ffluxd/src/flujo.c:51: undefined reference to `_pthread_cleanup_push' flujo.o(.text+0x2fb):/home/miguel/Projects/ffluxd/src/flujo.c:98: undefined reference to `pthread_cond_timedwait' flujo.o(.text+0x3a6):/home/miguel/Projects/ffluxd/src/flujo.c:118: undefined reference to `pthread_cond_timedwait' flujo.o(.text+0x521):/home/miguel/Projects/ffluxd/src/flujo.c:157: undefined reference to `pthread_cond_timedwait'


I can compile my whole code with the next instruction:
gcc -lpthread -I. file1.c file2.c .....

How can I configure Anjuta in order to build my project properly?
Do I have to add any header in my source code files?
or Do I have to add these flags (-lpthread -I.) anywhere?

THANKS IN ADVANCE





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]