Source compilation by given Makefile

Michael Sweet mike at easysw.com
Fri Jan 26 05:29:27 PST 2007


vladimir wrote:
> The config's output is :
> creating cache ./config.cache
> checking for gcc... gcc
> checking whether the C compiler (gcc  ) works... yes
> checking whether the C compiler (gcc  ) is a cross-compiler... no
> checking whether we are using GNU C... yes
> checking whether gcc accepts -g... yes
> checking for socket in -lsocket... no
> checking for gethostbyaddr in -lnsl... yes
> checking for cupsPrintFiles in -lcups... no
> checking how to run the C preprocessor... gcc -E
> checking for cups/cups.h... no
> ./configure: line 1009: test: too many arguments
> updating cache ./config.cache
> creating ./config.status
> creating Makefile
> creating config.h
> config.h is unchanged
> -----------------------
> The string "-I/cups-1.2.7" was manualy added by me into Makfile for "cups/cups.h... no" error resolving.
> 
> And output of make is :
> gcc -g -O2 -I/develop/cups-1.2.7    -c -o firstcups.o firstcups.c
> firstcups.c: In function ‘main’:
> firstcups.c:25: warning: ‘cupsGetPrinters’ is deprecated (declared at cups/cups.h:157)
> gcc -g -O2 -I/develop/cups-1.2.7  -o firstcups firstcups.o -lnsl
> firstcups.o: In function `main':
> /develop/CUPS/chap13-Overview_of_CUPS_Programming/firstcups.c:16: undefined reference to `cupsGetDefault'
> /develop/CUPS/chap13-Overview_of_CUPS_Programming/firstcups.c:25: undefined reference to `cupsGetPrinters'
> collect2: ld returned 1 exit status
> make: *** [firstcups] Error 1
> So, I simple have not libcups.a on my system, i guess. Where can I find it?

OK, you are trying to compile the CUPS book examples.  That source is
setup to look for CUPS in the standard locations, but you can use:

     CFLAGS="-I/develop/cups-1.2.7" LDFLAGS="-L/develop/cups-1.2.7/cups 
-L/develop/cups-1.2.7/filter" ./configure

to point the examples to the (non-installed) CUPS software.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com




More information about the cups-devel mailing list