Error: Stray '#" in program (SWIG)

I am using RHEL 6 and trying to compile some code using SWIG. The SWIG file is named mySwig.i and looks like %module base_module %{ #include "base.h" %} %include "base.h" The mySwig.i file is kept in a folder named foo. The folder foo also has other .h, .c and .cxx files. The command I use is gcc -fpic -c foo/* The output is: foo/mySwig.i:1 error: expected identifier or '(' before '%' token foo/mySwig.i:3 error: stray '#' in program foo/mySwig.i:5 error: expected identifier or '(' before '%' token Does anyone have any ideas how to resolve these errors?
You can't compile the SWIG specification file as a C++ source file! You need to convert it first to a source file with a special program. On another note, you tagged this question C++, but you use gcc to compile instead of e.g. g++.

以上就是Error: Stray '#" in program (SWIG)的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » CSS3 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏