[CentOS] How to compile APUE code on centos 6.X
Theodore Si
sjyzhxw at gmail.comTue Jul 29 14:00:53 UTC 2014
- Previous message: [CentOS] CentOS 6 and android connectivity (Nook)
- Next message: [CentOS] How to compile APUE code on centos 6.X
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi all, I want to compile the source code of Advanced Programming in the Unix Environment(APUE) 3rd edition, and I encountered some difficulties. After executing "make", I got this message: gcc -ansi -I../include -Wall -DLINUX -D_GNU_SOURCE barrier.c -o barrier -L../lib -lapue -pthread -lrt -lbsd /tmp/cc0gG99O.o: In function `thr_fn': barrier.c:(.text+0x6e): undefined reference to `heapsort' collect2: ld returned 1 exit status make[1]: *** [barrier] Error 1 make[1]: Leaving directory `/home/drizzlex/apue.3e/threads' make: *** [all] Error 1 In barrier.c, I found this #ifdef SOLARIS #define heapsort qsort #else extern int heapsort(void *, size_t, size_t, int (*)(const void *, const void *)); #endif If I change these code to How to install libbsd to solve this problem on CentOS (this works on Ubuntu)?
- Previous message: [CentOS] CentOS 6 and android connectivity (Nook)
- Next message: [CentOS] How to compile APUE code on centos 6.X
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list