[argyllcms] Re: Newbie help?

Ben Goren wrote:

Any chance you  could post your makefile? I  tried adding LINKLIBS
to the command line, but c isn't exactly my /forte./ I'm more of a
Perl kind of guy....
Well...
Here are the important lines of the makefile used to build this program. I deleted a lot of stuff not directly related to building the program.


INCLUDES=-I../h -I../xicc -I../cgats -I../numlib -I../icc -I../gamut -I../rspl -I../spectro -I../plot
CFLAGS=-c -mno-cygwin $(INCLUDES)
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


cpxchg.exe: cpxchg.o
   gcc -mno-cygwin -o $@ $^ $(LINKLIBS)

%.o : %.c
   gcc $(CFLAGS) -o $@ $<

When the makefile is invoked, the following two lines are generated to build the program. The first compiles it, the second links:
gcc -c -mno-cygwin -I../h -I../xicc -I../cgats -I../numlib -I../icc -I../gamut -I../rspl -I../spectro -I../plot -o cpxchg.o cpxchg.c
gcc -mno-cygwin -o cpxchg.exe cpxchg.o -L../plot -lplot -L../xicc -lxicc -L../spectro -linst -L../gamut -lgamut -L../cgats -lcgats -L../rspl -lrspl -L../numlib -lnum -L../icc -licc


You would probably just need to add the link info to your command line, something like this:
gcc -o cpxchg.exe cpxchg.c -mno-cygwin -I../h -I../cgats -L../plot -lplot -L../xicc -lxicc -L../spectro -linst -L../gamut -lgamut -L../cgats -lcgats -L../rspl -lrspl -L../numlib -lnum -L../icc -licc


However, you are running on a Mac, and would not need the -mno-cygwin switch, or the .exe file extension. That's for Windows, and the Cygwin environment. If the libraries have been built, all should be well.

I see your email address in the message headers, and I'll try contacting you directly, to avoid too much chatter on the list.

Cheers,
   Dave


Other related posts: