将c ++与python混合或在其间传输数据

时间:2016-08-06 10:18:03

标签: python c++ c

我检查了" Python编程/ Extending with C++"," Python编程/ Extending with C",并使用此[github]进行提升[github.com / TNG /升压 - 蟒-例子。但对于没有main()的c文件,eclipse说  undefined reference to main 添加main()后运行文件并运行" python test.py"在终端说

Traceback (most recent call last):
  File "hello.py", line 3, in <module>
    import hello
  File "/home/ahrovan/workspace/Test_py/src/hello.py", line 4, in <module>
    print (hello.greet())
AttributeError: 'module' object has no attribute 'greet'

0 个答案:

没有答案