错误:“警告C4005:'SWIGTEMPLATEDISAMBIGUATOR':宏重新定义" [英] Error: "warning C4005: 'SWIGTEMPLATEDISAMBIGUATOR': macro redefinition"
问题描述
我正在尝试编译SWIG
项目,并且该项目不断出现这样的错误:
I'm trying to compile a SWIG
project, and it keeps on giving errors like this:
swig_wrap.cpp(55):警告C4005:'SWIGTEMPLATEDISAMBIGUATOR':宏 重新定义
swig_wrap.cpp(55): warning C4005: 'SWIGTEMPLATEDISAMBIGUATOR': macro redefinition
还有这样的错误:
严重错误C1010:寻找预编译文件时文件意外结束 标头.您是否忘记在源中添加"#include"stdafx.h""?
fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
编译器
- Visual Studio 2015+更新3.
- SWIG v3.0.12
- Visual Studio 2015+Update 3.
- SWIG v3.0.12
Compiler
推荐答案
将以下内容添加到您的.i
文件中:
Add the following to your .i
file:
%begin %{
#include "stdafx.h"
%}
本节将代码注入到文件顶部的生成的包装中,您无需禁用预编译的标头.
This section injects code into the generated wrapper at the top of the file and you won't need to disable pre-compiled headers.
这篇关于错误:“警告C4005:'SWIGTEMPLATEDISAMBIGUATOR':宏重新定义"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!