On 5/28/2012 11:07 AM, Douglas Russell wrote:
I've just followed the exact same steps and I still get the error. I will try it with Python 2.6 tomorrow and if that doesn't work that only really leaves some Visual Studio 2010 problem. Meh.

Thanks for the help so far.

I performed the same project modifications using VS2010 (I have a another machine with 2010 SP1 installed), with the same result:
1>------ Build started: Project: example, Configuration: Release Win32 ------
1>  Performing Custom Build Tools
1>  In order to function correctly, please ensure the following environment variables are correctly set:
1>  PYTHON_INCLUDE: 
1>  PYTHON_LIB: 
1>  example.c
1>  example_wrap.c
1>  Generating Code...
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(D:\SDK\swig-2.0.4\Examples\python\simple\.\Release\example.dll) does not match the Linker's OutputFile property value (D:\SDK\swig-2.0.4\Examples\python\simple\_example.pyd). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(991,5): warning MSB8012: TargetExt(.dll) does not match the Linker's OutputFile property value (.pyd). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(example) does not match the Linker's OutputFile property value (_example). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>     Creating library .\Release\_example.lib and object .\Release\_example.exp
1>  example.vcxproj -> D:\SDK\swig-2.0.4\Examples\python\simple\.\Release\example.dll
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Another thing I should point out (other than not using the environment variables) is that I use my own build of Python.  I don't link against the pre-built files, I actually build Python for myself.  I don't know if that would make a difference in your case, though.

Render me gone,                       |||
Bob                                 ^(===)^
---------------------------------oOO--(_)--OOo---------------------------------
    I'm not so good with advice...can I interest you in a sarcastic comment?