TheHubbit / PyInventor

3D Graphics in Python with Open Inventor
http://thehubbit.github.io/PyInventor
BSD 3-Clause "New" or "Revised" License
16 stars 8 forks source link

Won't compile on Ubuntu 14.04, Python 2.7 #4

Closed dereks closed 7 years ago

dereks commented 9 years ago

Using the current HEAD on master (git clone ...)

cd ./PyInventor sudo python setup.py install

Results in:

src/PyInventor.cpp: In function ‘void PyInit_inventor()’:
src/PyInventor.cpp:622:28: error: variable ‘PyInit_inventor()::PyModuleDef iv_module’ has initializer but incomplete type
  static struct PyModuleDef iv_module = 
                            ^
src/PyInventor.cpp:624:3: error: ‘PyModuleDef_HEAD_INIT’ was not declared in this scope
   PyModuleDef_HEAD_INIT,
   ^
src/PyInventor.cpp:646:44: error: ‘PyModule_Create’ was not declared in this scope
  PyObject* mod = PyModule_Create(&iv_module);
                                            ^
src/PyInventor.cpp:671:9: error: return-statement with a value, in function returning 'void' [-fpermissive]
  return mod;
         ^

Would love to use this on my project. Hope it gets fixed :)

As a side note, I'm trying to use COIN (sudo apt-get install libcoin libcoin-dev) for the Open Inventor library. I hope it's compatible with PyInventor... didn't get that far yet.

TheHubbit commented 8 years ago

Sorry, I didn't logon for a while. I created the library using Python 3.x. Unfortunately the code is not compatible with Python 2.x. The ReadMe file should be more clear about that. I use PyInventor with Coin on both Mac and Windows. However, I'm not sure about the package you've installed with sudo as I build the latest version of Coin from source. If you or someone else wants to make the code backward compatible with Python 2.x, I would happily merge the changes into this repository.

TheHubbit commented 7 years ago

Python 2.7 is not supported. Closing this issue.