🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

(Python/C) linking issues when extending with bool types

Started by
-1 comments, last by dcosborn 19 years, 11 months ago
I'm writing a Python extension module and making use of the new Bool type as a parameter/return-value for one of my getter/setter function pairs. I'm using PyBool_FromLong, PyBool_Check, and Py_True. When I compile and link with python23.lib, I get unresolved references to PyBool_Type and Py_TrueStruct. Strangely, I don't get an unresolved reference for PyBool_FromLong. PyBool_Check is a macro that uses the PyBool_Type, so that one makes sense. I'm using a number of other python C/API functions, so I seem to only be missing some bool support. Is there another library I need to link with for full bool support? Update: On further investigation, it looks like I can't access PyInt_Type either. Update: PROBLEM SOLVED! I figured the .lib must be missing some stuff so I use pexports to generate a .def file for python23.dll, then dlltool to generate a new .lib. The new lib is 400K bigger than the old one and everything compiles perfectly now. :) [Edited by - dcosborn on July 18, 2004 4:46:32 PM]

This topic is closed to new replies.

Advertisement