[argyllcms] Re: Newbie help?

Ben Goren wrote:

Well,  before you  start  tossing binaries  around...I've got  the
Argyll source, and  I changed the #includes in cpxchg  to point to
the right place. This is where I'm at now:

cpxchg.c: In function 'usage':
cpxchg.c:156: warning: incompatible implicit declaration of built-in function 'exit'
cpxchg.c: In function 'cgats_rename':
cpxchg.c:168: warning: incompatible implicit declaration of built-in function 'strlen'
cpxchg.c:172: warning: incompatible implicit declaration of built-in function 'strcpy'
cpxchg.c: In function 'convert_filename':
cpxchg.c:231: warning: incompatible implicit declaration of built-in function 'strrchr'
cpxchg.c:235: warning: incompatible implicit declaration of built-in function 'malloc'
cpxchg.c:235: warning: incompatible implicit declaration of built-in function 'strlen'
cpxchg.c:238: warning: incompatible implicit declaration of built-in function 'strcpy'
cpxchg.c:239: warning: incompatible implicit declaration of built-in function 'strcat'
cpxchg.c:248: warning: incompatible implicit declaration of built-in function 'strrchr'
cpxchg.c:252: warning: incompatible implicit declaration of built-in function 'malloc'
cpxchg.c:252: warning: incompatible implicit declaration of built-in function 'strlen'
cpxchg.c:255: warning: incompatible implicit declaration of built-in function 'strcpy'
cpxchg.c:256: warning: incompatible implicit declaration of built-in function 'strcat'
cpxchg.c:261: warning: incompatible implicit declaration of built-in function 'malloc'
cpxchg.c:261: warning: incompatible implicit declaration of built-in function 'strlen'
cpxchg.c:264: warning: incompatible implicit declaration of built-in function 'strncpy'
cpxchg.c:266: warning: incompatible implicit declaration of built-in function 'strcat'
cpxchg.c:272: warning: incompatible implicit declaration of built-in function 'exit'
cpxchg.c: In function 'work':
cpxchg.c:313: warning: incompatible implicit declaration of built-in function 'exit'
cpxchg.c:325: warning: incompatible implicit declaration of built-in function 'exit'
/usr/bin/ld: Undefined symbols:
_new_cgats
collect2: ld returned 1 exit status


(This is on Mac OS X 10.4.6.)
Well, it seems I'm missing a few include files. (my wife says something like that all the time) Rather than me sending the whole file again, change the file to add stdlib.h and string.h, something like this:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "cgats.h"

You will need to link against the Argyll libraries. Here are the library definitions from my makefile:
LINKLIBS=-L../plot -lplot -L../xicc -lxicc -L../spectro -linst -L../gamut -lgamut -L../cgats -lcgats -L../rspl -lrspl
LINKLIBS+= -L../numlib -lnum -L../icc -licc


I think that's it.

Cheers,
   Dave



Other related posts: