当前位置: 动力学知识库 > 问答 > 编程问答 >

build - Missing '/' path while compiling using scons in CPPPATH expansion

问题描述:

Fatal error[Pe1696]: cannot open source file "Someheaderfile.hpp"

Although the path for Someheaderfile.hpp is included with

COMMON_INCLUDES = ['#Source/Interfaces/Common']

env.Append(CPPPATH = COMMON_INCLUDES)

The compiler while searching for the mentioned header prints the path as follows

searched: "SourceInterfacesCommon"

which is basically all the '/' removed.

The call made was

myEnv.Library(target, src_files)

and this boils down to

iccarm --silent -o Prod\somepath_obj\Somefile.o -otherflags

-ISource\Interfaces\Common Prod\somepath\Somefile.cpp

So although from the CPPPATH the file was included on the command line when carrying compilation it is not able to locate.

Is there anything which i miss that resulted in

Source/Interfaces/Common being changed to SourceInterfacesCommon

网友答案:

i have sorted out the issue ... seems to be because of the way i was creating the environment variable. On changing env = Environment(platform = ['cygwin'], ENV = os.environ) to env = Environment(ENV = os.environ) along with few other changes, everything works fine. Also i am not explicitly mentioning what should be the path seperator between folders to be, rather using os.join.path('X','Y','Z').

分享给朋友:
您可能感兴趣的文章:
随机阅读: