数時間努力した後、コンパイルできません dcp2icc-0.1Linuxで。簡単な使用ソースコードに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);
^
私が理解したのは、いくつかの基本的な埋め込みが削除されたためです。頑張ったファイルから欠落しているすべての内容が含まれています。(cstdlib
、inttypes.h
、limits.h
、cstring
)、しかし:
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
^
コンパイルするにはどうすればよいですか?このアプローチは合理的ですか?