[Anjuta-list] Failing to build - newbie



Hello all,

first I'd like to apologize for asking question which may be obvious.
I'm quite new to programming and on the steep learning curve.

Using Anjuta 1.2.4a on a debian etch system.

I've been writing some small program using the posix threading library
(pthread.h). Compiling is OK. Building is not. I've been following the
advanced tutorial in order to understand the way the autotools work with
anjuta, and I tried using the ACX_PTHREAD macro. This macro is
documented here:

	http://autoconf-archive.cryp.to/acx_pthread.html

Here's the output of a full rebuild:

> Construction du projet tout entier : thrdprj ...
> make
> cd . && /bin/sh ./config.status config.h
> config.status: creating config.h
> config.status: config.h is unchanged
> make  all-recursive
> make[1]: entrant dans le répertoire « /home/yziquel/Projects/thrdprj »
> Making all in po
> make[2]: entrant dans le répertoire « /home/yziquel/Projects/thrdprj/po »
> make[2]: Rien à faire pour « all ».
> make[2]: quittant le répertoire « /home/yziquel/Projects/thrdprj/po »
> Making all in src
> make[2]: entrant dans le répertoire « /home/yziquel/Projects/thrdprj/src »
> /bin/sh ../libtool --tag=CC   --mode=link gcc -g -O2     -Wall -g -g -O2 -g -O2      -o thrdprj main.o
> gcc -g -O2 -Wall -g -g -O2 -g -O2 -o thrdprj main.o
> main.o: In function `main':
> /home/yziquel/Projects/thrdprj/src/main.c:143: undefined reference to `pthread_create'
> collect2: ld returned 1 exit status
> make[2]: *** [krivcam] Erreur 1
> make[2]: quittant le répertoire « /home/yziquel/Projects/thrdprj/src »
> make[1]: *** [all-recursive] Erreur 1
> make: *** [all] Erreur 2
> make[1]: quittant le répertoire « /home/yziquel/Projects/thrdprj »
> Terminé ... sur un échec
> Temps total utilisé : 3 secondes

I have the following configuration options, in my project:

In the Projet -> Configuration du projet -> Configuration ->
Bibliothèques, I have the following written down:

> ACX_PTHREAD()
> 
> AC_SUBST(PTHREAD_LIBS)
> AC_SUBST(PTHREAD_CFLAGS)
> AC_SUBST(PTHREAD_CC)
> AC_SUBST(PTHREAD_CREATE_JOINABLE)
> AC_SUBST(PTHREAD_CREATE_UNDETACHED)

In the Préférences -> Compilateur/Éditeur de liens -> Options, I have the:

Flags compilateur (CFLAGS) set to

> $(CFLAGS) $(PTHREAD_CFLAGS) $(LDFLAGS) $(PTHREAD_LIBS) $(LIBS)

and the Options de l'éditeur de liens (LDFLAGS) set to

> $(CFLAGS) $(PTHREAD_CFLAGS) $(LDFLAGS) $(PTHREAD_LIBS) $(LIBS)

I'd like to understand what this error message means precisely.

Thanks for any help.

Guillaume Yziquel.




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