add -llcms to the command line. This links the lcms library with the 
missing function in:
gcc -g -B/usr/local/include -L/path/to/lcms -llcms -o test1 test1.c


Am 26.01.06, 11:26 -0000 schrieb Dermot Paikkos:

> Hi,
> 
> Sorry I think this is more a C question than an lcms question. I did 
> post to c-prog at yahoo but no-one replied.
> 
> I have the following (tiny) code:
> 
> =====================
> #include <stdio.h>
> #include "/usr/local/include/lcms.h"
> 
> 
> int main ()
> {
>         cmsHPROFILE hInProfile;
>         hInProfile = cmsOpenProfileFromFile("18442.icm", "r");
>         printf("Done\n");
>         cmsCloseProfile(hInProfile);
>         return 0;
> 
> }
> =====================
> 
> When I try and compile I am getting an error about the 
> cmsOpenProfileFromFile not being defined.
> 
> gcc -g -B/usr/local/include -o test1 test1.c
> /tmp/ccu6aNiP.o(.text+0x2a): In function `main':
> /root/c_test/test1.c:13: undefined reference to 
> `cmsOpenProfileFromFile'
> /tmp/ccu6aNiP.o(.text+0x4b):/root/c_test/test1.c:17: undefined 
> reference to `cmsCloseProfile'
> collect2: ld returned 1 exit status
> make: *** [test1] Error 1
> 
> 
> lcms.h is in the current directory, even though I also specified the 
> full path to it's installed location. 
> 
> I am sure this is a simple program, down to my lack of skill with C, 
> so again sorry but any help would be appreciated.
> Thanx.
> Dp.
> 
> 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to