Error trying to compile

Sebastian c.sebasgonzalez at gmail.com
Thu Jul 21 05:29:18 PDT 2011


I am tryng to develop a filter for a label printer B-SV4 made by Toshiba TEC.
When I try to compile with gcc I have the following otuput

sebas at portatil:~/ppd/ppd$ gcc -o rastertotec -I /home/sebas/cups-1.4.4/ rastertotec.c
/tmp/ccgoniEt.o: In function `StartPage':
rastertotec.c:(.text+0x5ed): undefined reference to `ppdFindMarkedChoice'
/tmp/ccgoniEt.o: In function `main':
rastertotec.c:(.text+0x85a): undefined reference to `_cupsLangPrintf'
rastertotec.c:(.text+0x8bc): undefined reference to `_cupsLangPrintf'
rastertotec.c:(.text+0x8f4): undefined reference to `cupsRasterOpen'
rastertotec.c:(.text+0x939): undefined reference to `cupsParseOptions'
rastertotec.c:(.text+0x954): undefined reference to `ppdOpenFile'
rastertotec.c:(.text+0x974): undefined reference to `ppdMarkDefaults'
rastertotec.c:(.text+0x996): undefined reference to `cupsMarkOptions'
rastertotec.c:(.text+0xa73): undefined reference to `_cupsLangPrintf'
rastertotec.c:(.text+0xa96): undefined reference to `cupsRasterReadPixels'
rastertotec.c:(.text+0xb20): undefined reference to `cupsRasterReadHeader2'
rastertotec.c:(.text+0xb3d): undefined reference to `cupsRasterClose'
rastertotec.c:(.text+0xb65): undefined reference to `ppdClose'
rastertotec.c:(.text+0xb7c): undefined reference to `cupsFreeOptions'
rastertotec.c:(.text+0xb9a): undefined reference to `_cupsLangPuts'
rastertotec.c:(.text+0xbb6): undefined reference to `_cupsLangPuts'
collect2: ld returned 1 exit status

Though these functions are in the include headers except _cupsLangPrintf that I have not find yet.

Following the compile instrucction on online cups pages

>From the command-line, create a file called sample.c using your favorite editor and then run the following command to compile it with GCC and run it:

gcc -o simple `cups-config --cflags` simple.c `cups-config --libs`
./simple

The cups-config command provides the compiler flags ("cups-config --cflags") and libraries ("cups-config --libs") needed for the local system.

I have not found cups-config but cups-config.in and tried again.

sebas at portatil:~/ppd/ppd$ gcc -o rastertotec `/home/sebas/cups-1.4.4/cups-config.in --cflags` rastertotec.c `/home/sebas/cups-1.4.4/cups-config.in --libs`
gcc: @EXTLINKCUPS@: No existe el fichero o el directorio
gcc: @LIBGSSAPI@: No existe el fichero o el directorio
gcc: @EXPORT_SSLLIBS@: No existe el fichero o el directorio
gcc: @EXPORT_LIBZ@: No existe el fichero o el directorio
gcc: @LIBS@: No existe el fichero o el directorio

In this case it does not find some files or directories that cups-config.in referencies.

Please any clue to solve it.

Sebas







More information about the cups-devel mailing list