简体   繁体   English

SWIG致命错误C1083:无法打开包含文件

[英]SWIG Fatal error C1083: Cannot open include file

I am trying to build python scripts from C++ code using SWIG and I am receiving the error in the title. 我正在尝试使用SWIG从C ++代码构建python脚本,并且标题中出现错误。 If I change the interface and fully qualify the path to the external header file it works fine. 如果我更改了接口并完全限定了外部头文件的路径,则可以正常工作。

Couple of questions: 几个问题:

  1. Can the path get included in the command call? 路径可以包含在命令调用中吗? I tried -IC:\\Code\\ExternalHeaders but that did not work. 我尝试了-IC:\\Code\\ExternalHeaders但这没有用。

  2. Can this path be argument driven? 可以将此路径作为参数驱动吗? Different developers will have different paths. 不同的开发人员将有不同的路径。 This way they can make the path change in their project.scons file and everything would work. 这样,他们可以在他们的project.scons文件中更改路径,一切都会正常进行。

We use SCONS for building all source code. 我们使用SCONS来构建所有源代码。 The header file is located in C:\\Code\\Edwards\\EWCppLibrary\\EWBase . 头文件位于C:\\Code\\Edwards\\EWCppLibrary\\EWBase Here's the log: 这是日志:

C:\Code\Python\QTPythonExample\QETestProject_CLM>scons -f vs.scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... scons: building associated VariantDir targets: build\win32\release build\win32\debug swig -o build\win32\debug\src\py_swig_interface_wrap.cc

-IC:\Code\Edwards\EWCppLibrary -Iinc -Isrc -IEWBase -IC:\Python27\include

-python -c++ -nodefault -templatereduce src\py_swig_interface.i SWIG(1) : Warning 123: dangerous, use -nodefaultctor, -nodefaultdtor instead. cl /Fobuild\win32\debug\src\py_swig_interface_wrap.obj /c build\win32\debug\src\py_swig_interface_wrap.cc /TP /DEBUG /Zi /MDd /Od /EHsc /nologo /D__WIN32__ /DWIN32 /DDEBUG /IC:\Code\Edwards\EWCppLibrary /Iinc /Isrc /IEWBase /IC:\Python27\include /Zi /Fdbuild/w in32/debug\py_swig_interface_wrap.obj.pdb py_swig_interface_wrap.cc build\win32\debug\src\py_swig_interface_wrap.cc(3065) : fatal error C1083: Cannot open include file: 'EWStddef.h': No such file or  directory scons: *** [build\win32\debug\src\py_swig_interface_wrap.obj] Error 2 scons: building terminated because of errors.

C:\Code\Python\QTPythonExample\QETestProject_CLM>

You need to specify: 您需要指定:

/IC:\Code\Edwards\EWCppLibrary\EWBase

For your compiler. 对于您的编译器。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 致命错误C1083:无法打开包含文件:'openssl / opensslv.h':没有这样的文件或目录 - fatal error C1083: Cannot open include file: 'openssl/opensslv.h': No such file or directory 致命错误 C1083:无法打开包含文件:'dlfcn.h':没有这样的文件或目录 PyLPSolve - fatal error C1083: Cannot open include file: 'dlfcn.h': No such file or directory PyLPSolve 致命错误 C1083:无法打开包含文件:“mecab.h”:没有这样的文件或目录 - fatal error C1083: Cannot open include file: 'mecab.h': No such file or directory 致命错误 C1083:无法打开包含文件:'io.h':没有这样的文件或目录 - fatal error C1083: Cannot open include file: 'io.h': No such file or directory 编译Cython代码产生...致命错误C1083:无法打开包含文件:'io.h' - Compiling Cython code yields… fatal error C1083: Cannot open include file: 'io.h' 致命错误 C1083:无法打开包含文件:“basetsd.h” - fatal error C1083: Cannot open include file: 'basetsd.h' 致命错误 C1083:无法打开包含文件:'openssl/opensslv.h' - Fatal error C1083: Cannot open include file: 'openssl/opensslv.h' Tokyocabinet致命错误C1083:无法打开包含文件:tcbdb.h - Tokyocabinet fatal error C1083 : cannot open include file:tcbdb.h Cython 编译器 - 致命错误 C1083:无法打开包含文件 - Cython compiler - fatal error C1083: Cannot open include file snappy/snappymodule.cc(31): 致命错误 C1083: 无法打开包含文件: 'snappy-c.h': 没有那个文件或目录 - snappy/snappymodule.cc(31): fatal error C1083: Cannot open include file: 'snappy-c.h': No such file or directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM