【问题标题】:How to compile package with sub-directory includes in SCons?如何在 SCons 中编译包含子目录的包?
【发布时间】:2014-08-31 00:17:17
【问题描述】:

scons 输出(为便于阅读而拆分),relevant commit:

scons: Building targets ...
g++ -o build/XMP/XMPCore/source/ExpatAdapter.o -c -O2 -iquote- -DUNIX_ENV=1 \
-D_FILE_OFFSET_BITS=64 -Ifixes/XMP-Toolkit -IXMP-Toolkit-SDK-CC201306/build \
-IXMP-Toolkit-SDK-CC201306/source/common -IXMP-Toolkit-SDK-CC201306/XMPCore/source \
-IXMP-Toolkit-SDK-CC201306/source/XMPFiles \
-IXMP-Toolkit-SDK-CC201306/source/XMPFiles/FileHandlers \
-IXMP-Toolkit-SDK-CC201306/source/XMPFiles/FormatSupport \
-IXMP-Toolkit-SDK-CC201306/third-party/MD5 \
-IXMP-Toolkit-SDK-CC201306/public/include \
XMP-Toolkit-SDK-CC201306/XMPCore/source/ExpatAdapter.cpp
XMP-Toolkit-SDK-CC201306/XMPCore/source/ExpatAdapter.cpp:9:77: fatal error:
public/include/XMP_Environment.h: No such file or directory
 #include "public/include/XMP_Environment.h" // ! Must be the first #include!
                                                                             ^

似乎 XMP 开始在文件中使用相对包含,而不是依赖编译器选项。如何在 SCons 中处理这种新的包含样式?

(背景:在尝试编译dcp2icc(使用基于原始ReadMe.txtMakefile)时,我遇到了一堆错误,例如'strlen' is not a member of 'std',这似乎是因为include clean-up in GCC。而不是比起修补一堆​​第三方库,我决定尝试更新版本的 XMP。)

【问题讨论】:

    标签: makefile scons xmp


    【解决方案1】:

    您应该尝试解决此包含失败的问题,就像您在命令行中所做的一样:通过添加缺少的包含路径,在您的情况下似乎是“-IXMP-Toolkit-SDK-CC201306”。因此,将您的 origXMP 也添加到 CPPPATH...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-06-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-17
      • 1970-01-01
      相关资源
      最近更新 更多