So, I don't know if folks in the Boost.Python community are aware, but the game Civilization 4 makes use of Python as its primary in-game scripting/modding language. The Python scripts interact with the Civ4 engine via Boost.Python (1.32 I believe). Up until a month ago, I hadn't really used Python, and I'd never heard of Boost.Python :/. As part of my learning experience, I've been learning more about the tools available in this space. My current point in this process is trying to get PyDev and Eclipse configured to allow me to edit Civ4 mods. In pursuit of that goal, I've been talking with Fabio Zadrozny over on the PyDev site about configuring PyDev. He's been very helpful, but I've hit a snag for which he doesn't recall the issue and has sent me here in hopes that someone here might be able to help. I have Python (2.2, 2.3 and 2.4 ;), installed on my machine. I've managed to build Boost.Python 1.32 static and dynamic libs, and have that dir in my path. I know that Civ4's Python API objects are stored in a file called CvGameCoreDLL.dll. When I try to import it from the command line I get the following error: ImportError: dynamic module does not define init function (initCvGameCoreDLL) This being a step forward from when it was saying: This application has failed to start because boost_python-vc71-mt-1_32.dll was not found. Re-installing the application may fix this problem. What I am trying to accomplish, btw, is to be able to get the signatures of the API functions and classes (via intellisense help) from within PyDev. Fabio assures me that if I can get the import call to work from the command line, PyDev will be able to get the signatures. Anyone have any idea what's missing? (This is all taking place on a windows box, btw)
Shin
So, I don't know if folks in the Boost.Python community are aware, but the game Civilization 4 makes use of Python as its primary in-game scripting/modding language.
We know; http://www.boost.org/libs/python/doc/projects.html
The Python scripts interact with the Civ4 engine via Boost.Python (1.32 I believe). Up until a month ago, I hadn't really used Python, and I'd never heard of Boost.Python :/. As part of my learning experience, I've been learning more about the tools available in this space. My current point in this process is trying to get PyDev and Eclipse configured to allow me to edit Civ4 mods. In pursuit of that goal, I've been talking with Fabio Zadrozny over on the PyDev site about configuring PyDev. He's been very helpful, but I've hit a snag for which he doesn't recall the issue and has sent me here in hopes that someone here might be able to help.
I have Python (2.2, 2.3 and 2.4 ;), installed on my machine. I've managed to build Boost.Python 1.32 static and dynamic libs, and have that dir in my path. I know that Civ4's Python API objects are stored in a file called CvGameCoreDLL.dll. When I try to import it from the command line I get the following error:
ImportError: dynamic module does not define init function (initCvGameCoreDLL)
You're missing BOOST_PYTHON_MODULE(CvGameCoreDLL) or you've failed to build with the appropriate options. I suggest you follow the build instructions for your module at http://www.boost.org/libs/python/doc/building.html#building_ext If you add -n -a to the bjam command-line it will just print the build commands so you can look at the options if you prefer. -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (2)
-
David Abrahams
-
Shin