I'm trying to update the Fredrik's DCRaw port but i have a problem during compile, it asked for LCMS deps so i've installed LibLCMS putting all deps files in SDK:Local/#, then i try to compile it with a simple "make" command
But I have:
Quote:
Processo: Shell 5 5.AmigaOS4:> Work:SDK/Progetti/dcraw/ 5.Work:SDK/Progetti/dcraw> make gcc -mcrt=clib2 -O2 -c -o dcraw.o dcraw.c dcraw.c:52:18: error: lcms.h: No such file or directory dcraw.c: In function 'apply_profile': dcraw.c:8097: error: 'cmsHPROFILE' undeclared (first use in this function) dcraw.c:8097: error: (Each undeclared identifier is reported only once dcraw.c:8097: error: for each function it appears in.) dcraw.c:8097: error: expected ';' before 'hInProfile' dcraw.c:8098: error: 'cmsHTRANSFORM' undeclared (first use in this function) dcraw.c:8098: error: expected ';' before 'hTransform' dcraw.c:8102: error: 'LCMS_ERROR_SHOW' undeclared (first use in this function) dcraw.c:8104: error: 'hInProfile' undeclared (first use in this function) dcraw.c:8116: error: 'hOutProfile' undeclared (first use in this function) dcraw.c:8133: error: 'hTransform' undeclared (first use in this function) dcraw.c:8133: error: 'TYPE_RGBA_16' undeclared (first use in this function) dcraw.c:8134: error: 'INTENT_PERCEPTUAL' undeclared (first use in this function) make: *** [dcraw.o] Error 1 5.Work:SDK/Progetti/dcraw>
dcraw.c:52:18: error: lcms.h: No such file or directory
Mean that dcraw.c cant found lcms.h file (check if your SDK have it in local/newlib/includes or kind). If problem still will occurs, you can check in dcraw.c how that lcms.h are includes. It can be included like: include "lcms.h" (" " there mean that compiler will try to found include in the current direcotry". if it will: include <lcms.h> then < > say to compiler found a file in the SDK. it also can be like: include <some_path/lcms.h> so, you maybe need to create that "some_path" in your sdk includes, and put lcms.h in it.
For this they wasn't checked by the compiler (strange is that there were any installing guide into LibCMS archive that explain the correct paths, this is not so helpfull for a newbie!)
Aniway, as you say i've installed the include (lcms.h and icc34.h) also in:
SDK:local/common/include
But now i have:
Quote:
.Work:SDK/Progetti/dcraw> make gcc -mcrt=clib2 -O2 -c -o dcraw.o dcraw.c In file included from dcraw.c:52: /SDK/local/common/include/lcms.h:179:23: error: memory.h: No such file or directory In file included from dcraw.c:52: /SDK/local/common/include/lcms.h:190: error: conflicting types for 'BYTE' /SDK/include/include_h/exec/types.h:108: error: previous declaration of 'BYTE' was here /SDK/local/common/include/lcms.h:191: error: conflicting types for 'WORD' /SDK/include/include_h/exec/types.h:111: error: previous declaration of 'WORD' was here make: *** [dcraw.o] Error 1 5.Work:SDK/Progetti/dcraw>
Edit: change the -mcrt=clib2 in the Makefile to -mcrt=newlib if you want to use the latest newlib-only liblcms build
Ehm, shame on me, this change was pretty obvious
All goes better now except for a file missed (memory.h) where i can found it ?
Quote:
Processo: Shell 5 5.AmigaOS4:> Work:SDK/Progetti/dcraw/ 5.Work:SDK/Progetti/dcraw> make gcc -mcrt=newlib -O2 -c -o dcraw.o dcraw.c In file included from dcraw.c:52: /SDK/local/newlib/include/lcms.h:179:23: error: memory.h: No such file or directory make: *** [dcraw.o] Error 1 5.Work:SDK/Progetti/dcraw>
I reply to myself, i've found memory.h and put it in common as well, logically a new problem happen
Quote:
5.Work:SDK/Progetti/dcraw> make gcc -mcrt=newlib -O2 -c -o dcraw.o dcraw.c In file included from dcraw.c:52: /SDK/local/newlib/include/lcms.h:190: error: conflicting types for 'BYTE' /SDK/include/include_h/exec/types.h:108: error: previous declaration of 'BYTE' was here /SDK/local/newlib/include/lcms.h:191: error: conflicting types for 'WORD' /SDK/include/include_h/exec/types.h:111: error: previous declaration of 'WORD' was here make: *** [dcraw.o] Error 1 5.Work:SDK/Progetti/dcraw>
You don't need to have lcms.h in both SDK:local/common/include and SDK:local/newlib/include. To make a clib2 build of dcraw you need a clib2 build of liblcms too which the above archive doesn't contain. This is why I suggested switching to newlib above.
Spot Up probably uses a dummy memory.h include file. I've fixed it so it shouldn't need it now but if you run into this problem in the future you can create one simply by typing the following in Notepad and saving it as "SDK:local/common/include/memory.h": Quote:
You don't need to have lcms.h in both SDK:local/common/include and SDK:local/newlib/include. To make a clib2 build of dcraw you need a clib2 build of liblcms too which the above archive doesn't contain. This is why I suggested switching to newlib above.
You right, this was the cause of the conflicts above (BYTE and WORD)