A few questions before submitting a patch

Kanma

13-03-2006 16:34:40

Hello

I'd like to submit a patch to the vc71 project files in order to allow the compilation from the Ogre source code, located at $(OGRE_SRC_HOME), instead than from the Ogre SDK located at "..\..\..\dependancies\ogre".

In short, I'd like to add a 'Debug Py24|Win32 (from source)' and a 'Release Py24|Win32 (from source)' (or something equivalent if you don't like thoses names :wink: ) to the solution's configurations list.

I just have a few questions before doing so:
1) would it be usefull to someone else than me, and so worth a patch? ^^
2) Is there a reason for the current configurations to output to the same file (pyogre\_ogre.pyd) in debug and in release mode? Would it cause a problem to have a 'pyogre\debug' directory instead?
3) for those of you which compile in Debug mode, how are you dealing with the following problem: Python.h (in fact, pyconfig.h), use the following code to select the python lib to link against:
# ifdef _DEBUG
# pragma comment(lib,"python24_d.lib")
# else
# pragma comment(lib,"python24.lib")
# endif /* _DEBUG */


Since I'd like to link against the release version of Python even in debug mode (it works fine, and in fact, it's also what the current .vcproj tries to do), I had to alter my SWIG installation to produce the following code in the generated C++ file:

# ifdef _DEBUG
# pragma comment(lib,"python24_d.lib")
# else
# pragma comment(lib,"python24.lib")
# endif /* _DEBUG */


Is there a better way to do it? Is someone using pyogre in debug mode at all? ^^

futnuh

30-07-2006 06:24:50

Kanma, did you submit a patch for the above? I'd like to see the same for the VC Express 2005 solutions files.

Istari

30-07-2006 12:04:50

I think that the debug build of Python expects to find files named xxx_d.pyd
instead of xxx.pyd so the name should only matter if you want to debug Python too.

This is what I always use when I don't want to link against the debug version of Python:# ifdef _DEBUG
# undef _DEBUG
# include "Python.h"
# define _DEBUG
# else
# include "Python.h"
# endif