Add new comment

link order

compiling from git gives following error:
g++ -fPIC -fopenmp -L/opt/local/lib64 -llcms2 -o bin/raw-identify samples/bin_raw_identify-raw-identify.o -Llib/ -lm -lraw
lib//libraw.a(lib_libraw_a-dcraw_fileio.o): In function `LibRaw::apply_profile(char const*, char const*)':
dcraw_fileio.cpp:(.text+0xae9): undefined reference to `cmsOpenProfileFromFile'
dcraw_fileio.cpp:(.text+0xb1c): undefined reference to `cmsOpenProfileFromMem'
dcraw_fileio.cpp:(.text+0xb60): undefined reference to `cmsCreate_sRGBProfile'
dcraw_fileio.cpp:(.text+0xc58): undefined reference to `cmsOpenProfileFromMem'
dcraw_fileio.cpp:(.text+0xd43): undefined reference to `cmsCreateTransform'
dcraw_fileio.cpp:(.text+0xd8d): undefined reference to `cmsDoTransform'
dcraw_fileio.cpp:(.text+0xda7): undefined reference to `cmsDeleteTransform'
dcraw_fileio.cpp:(.text+0xdb3): undefined reference to `cmsCloseProfile'
dcraw_fileio.cpp:(.text+0xdbf): undefined reference to `cmsCloseProfile'
collect2: ld returned 1 exit status
make: *** [bin/raw-identify] Fehler 1

I think, its because of the link order. Note -lraw needs -llcms2. The later objects and libraries have generally to satisfy the earlier object and libraries symbol requirements. Thus -lraw can not see the symbols provided by -llcms2. Distribution packaging is especial picky about that, because much more warnings and errors are switched on by default.

Thanks in advance.

Forums: