
Hi guys, Is boost::python supposed to work with msvc2005 ? I took the hello world from "embedding python" and "error_already_set" is being thrown at me... Here's the code I used : #include <iostream> #include <string> #include <boost/python.hpp> using namespace boost::python; void greet() { Py_Initialize(); // Retrieve the main module. object main = import("__main__"); // Retrieve the main module's namespace object global(main.attr("__dict__")); // Define greet function in Python. object result = exec( "def greet(self): \n" " return 'Hello from Python!' \n", global, global); // Create a reference to it. object greet = global["greet"]; // Call it. std::string message = extract<std::string>(greet()); std::cout << message << std::endl; Py_Finalize(); } int main() { greet(); return 0; }