如何编译dcp2icc?

如何编译dcp2icc?

经过几个小时的尝试后我无法编译 dcp2icc-0.1在 Linux 上。用一个简单的在原来的代码中添加Makefile它失败如下:

g++ -o build/XMP/source/XMPCore/ExpatAdapter.o -c -O2 -iquote- -DUNIX_ENV=1 -D_FILE_OFFSET_BITS=64 -Ifixes/XMP-Toolkit -IXMP-Toolkit-SDK-4.4.2/build -IXMP-Toolkit-SDK-4.4.2/source/common -IXMP-Toolkit-SDK-4.4.2/source/XMPCore -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport -IXMP-Toolkit-SDK-4.4.2/third-party/MD5 -IXMP-Toolkit-SDK-4.4.2/public/include XMP-Toolkit-SDK-4.4.2/source/XMPCore/ExpatAdapter.cpp
In file included from XMP-Toolkit-SDK-4.4.2/source/XMPCore/ExpatAdapter.cpp:10:0:
XMP-Toolkit-SDK-4.4.2/source/XMPCore/XMPCore_Impl.hpp: In function 'bool IsPathPrefix(XMP_StringPtr, XMP_StringPtr)':
XMP-Toolkit-SDK-4.4.2/source/XMPCore/XMPCore_Impl.hpp:371:28: error: 'strlen' is not a member of 'std'
  XMP_StringLen prefixLen = std::strlen(prefix);
                            ^

据我了解,这是因为一些默认包含已被删除。我试过包括文件丢失的所有内容cstdlibinttypes.hlimits.hcstring), 但:

g++ -o build/XMP/source/XMPFiles/FileHandlers/ASF_Handler.o -c -O2 -iquote- -DUNIX_ENV=1 -D_FILE_OFFSET_BITS=64 -Ifixes/XMP-Toolkit -IXMP-Toolkit-SDK-4.4.2/build -IXMP-Toolkit-SDK-4.4.2/source/common -IXMP-Toolkit-SDK-4.4.2/source/XMPCore -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport -IXMP-Toolkit-SDK-4.4.2/third-party/MD5 -IXMP-Toolkit-SDK-4.4.2/public/include XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/ASF_Handler.cpp
In file included from XMP-Toolkit-SDK-4.4.2/source/XMPFiles/XMPFiles_Impl.hpp:24:0,
                 from XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/ASF_Handler.hpp:13,
                 from XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/ASF_Handler.cpp:10:
fixes/XMP-Toolkit/LargeFileAccess.hpp:21:13: error: conflicting declaration 'typedef int LFA_FileRef'
 typedef int LFA_FileRef;
             ^

我试过强制类型声明void *(谢谢霍华德!):

g++ -o build/XMP/source/common/LargeFileAccess.o -c -O2 -iquote- -DUNIX_ENV=1 -D_FILE_OFFSET_BITS=64 -Ifixes/XMP-Toolkit -IXMP-Toolkit-SDK-4.4.2/build -IXMP-Toolkit-SDK-4.4.2/source/common -IXMP-Toolkit-SDK-4.4.2/source/XMPCore -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport -IXMP-Toolkit-SDK-4.4.2/third-party/MD5 -IXMP-Toolkit-SDK-4.4.2/public/include XMP-Toolkit-SDK-4.4.2/source/common/LargeFileAccess.cpp
XMP-Toolkit-SDK-4.4.2/source/common/LargeFileAccess.cpp: In function 'void LFA_Close(LFA_FileRef)':
XMP-Toolkit-SDK-4.4.2/source/common/LargeFileAccess.cpp:575:20: error: cast from 'LFA_FileRef {aka void*}' to 'int' loses precision [-fpermissive]
   int descr = (int)file;
                    ^

我试过使用32位模式编译:

g++ -o build/XMP/source/XMPCore/XMPCore_Impl.o -c -m32 -O2 -iquote- -DUNIX_ENV=1 -D_FILE_OFFSET_BITS=64 -Ifixes/XMP-Toolkit -IXMP-Toolkit-SDK-4.4.2/build -IXMP-Toolkit-SDK-4.4.2/source/common -IXMP-Toolkit-SDK-4.4.2/source/XMPCore -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport -IXMP-Toolkit-SDK-4.4.2/third-party/MD5 -IXMP-Toolkit-SDK-4.4.2/public/include XMP-Toolkit-SDK-4.4.2/source/XMPCore/XMPCore_Impl.cpp
In file included from /usr/include/c++/4.9.1/bits/stl_algo.h:59:0,
                 from /usr/include/c++/4.9.1/algorithm:62,
                 from XMP-Toolkit-SDK-4.4.2/source/XMPCore/XMPCore_Impl.cpp:16:
/usr/include/c++/4.9.1/cstdlib:178:10: error: expected unqualified-id before '__int128'
   inline __int128
          ^

我需要做什么才能编译它?这种方法合理吗?

相关内容