Error trying to compile

Sebastian c.sebasgonzalez at gmail.com
Sat Jul 23 07:45:24 PDT 2011


Thanks for your answer.
I am running debian squeeze and cups 1.4 that is suppose to have DDK in it. But following this clue I have isntall all -dev packages related with cups and it seems work better. But still the output is like this

sebas at portatil:~/ppd/ppd$ gcc -o rastertotec -I /usr/include `cups-config --cflags` rastertotec.c `cups-config --libs`
/tmp/ccyWTJNx.o: In function `main':
/home/sebas/ppd/ppd/rastertotec.c:358: undefined reference to `cupsRasterOpen'
/home/sebas/ppd/ppd/rastertotec.c:403: undefined reference to `cupsRasterReadHeader2'
/home/sebas/ppd/ppd/rastertotec.c:443: undefined reference to `cupsRasterReadPixels'
/home/sebas/ppd/ppd/rastertotec.c:467: undefined reference to `cupsRasterClose'
collect2: ld returned 1 exit status

So still it does not find some functions that are defined in raster.h that is of course included.

Sorry if this is something too obvious. My knowledge of C is very short. I only worked under dos several years ago.

Thanks in advance.

Sebas



> Install the CUPS developer package for your Linux distro.
>
> (and don't copy the use of the _cupsLang* functions - those are private functions that have changed over the various CUPS releases and are NOT safe to call from a third-party driver!)
>
> On Jul 21, 2011, at 8:29 AM, Sebastian wrote:
>
> > 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
> >
> >
> >
> > _______________________________________________
> > cups-dev mailing list
> > cups-dev at easysw.com
> > http://lists.easysw.com/mailman/listinfo/cups-dev
>
> ________________________________________________________________________
> Michael Sweet, Senior Printing System Engineer, PWG Chair
>





More information about the cups mailing list