我检查了" 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'