Comment 6 for bug 909454

Revision history for this message
Neil Tan (emtneutrino) wrote :

When supplying compile options manually on the command line, you would have to specify -llcms to link to liblcms.so and -ljpeg to link to libjpeg.so for the calls in libmng.so to link to the proper object code. It is similar to the -lm link option which would link sin, cos, and tan function calls to the math library which is libm.so. From my experience with OBSD, you always have to specify -lm when linking trigonometry math functions. For example to compile a program using the trigonometry functions you would normally write "gcc -o program program.c -lm". I'm guessing the same has to be done for liblcms.so and libjpeg.so. The compile line would be something like "g++ -o stratagus stratagus.cpp -llcms -ljpeg -lm". If there is a way to make CMake add -llcms and -ljpeg to the LDFLAGS variable only for the BSD case, that would probably be the way to go.