I am creating a cross-platform version of OS X with the latest version of dcraw.c I am doing this on OS X 10.6.8 until I have PPC compatibility. Now my problem is that strnlen seems to be used in the latest version of the program, and it is not in 10.6.8, and gcc gives me these messages:
Undefined symbols for architecture i386: "_strnlen", referenced from: ... Undefined symbols for architecture ppc: "_strnlen", referenced from: ...
So, I would just like to define strnlen, but don't know how to do it.
Q: Is it possible to provide a working strnlen definition for use in dcraw.c?
My gcc compilation command is btw:
gcc -o dcraw -O4 -Wall -force_cpusubtype_ALL -mmacosx-version-min=10.4 -arch i386 -arch ppc dcraw.c -lm -DNODEPS
source share