Otto, You are correct. Generally, you should use the same compiler (MSVC2008).
Building CPython extensions with a different version of Visual Studio can lead to undesirable behaviour, simply not loading an extension module or crashing. This is because different versions of the C runtime will be loaded, and conflict. By far the most robust solution is to use MSVC2008 for everything. Regards, Simon On Tue, Jan 15, 2013 at 4:55 PM, Otto Chiu <[email protected]> wrote: > Hi Roman,**** > > I read somewhere and somebody on the mailing list told me that since > Python is compiled with MSVC 2008, I need to use it to create my C++ > library and PySide bindings. Is this not true? Can I use the newer versions > of MSVC?**** > > ** ** > > Thanks,**** > > Otto**** > > ** ** > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Roman > Lacko > *Sent:* Tuesday, January 15, 2013 8:07 AM > *To:* ZHONG Zhu; [email protected] > *Subject:* Re: [PySide] Simple shiboken binding tutorial -- was PySide - > Qt5 - Swig**** > > ** ** > > sorri, you also have to update the path where you have installed Qt on > your system in files: > > pyside\include\PySide\pyside_global.h > FooLib\generate_binding.bat**** > > ** ** > > ...replace this "c:\Qt\qt-4.8.4-msvc2010-x64" with your path**** > > ** ** > > ** ** > > 2013/1/15 Roman Lacko <[email protected]>**** > > btw, you need to update paths to python libs and includes in > FooLibBinding\FooLibBinding.pro. I have installed python in c:\Python27_64. > **** > > Also if you are using mingw, you will need to change the .lib extension to > .a**** > > > INCLUDEPATH += ../pyside/include/PySide \ > ../pyside/include/PySide/QtCore \ > ../pyside/include/shiboken \ > c:/Python27_64/include \ > ../FooLib > > LIBS += c:/Python27_64/libs/python27.lib \ > ../pyside/shiboken-python2.7.lib \ > ../FooLib-build-Desktop-Release/release/FooLib.lib**** > > ** ** > > 2013/1/15 Roman Lacko <[email protected]>**** > > Hi,**** > > i have prepared the sample projects for you here [1]**** > > Description:**** > > > This is sample demonstration how to generate simple bindings with shiboken > python binding generator > > FooLib project contains the library for which we want to generate the > bindings > FooLibBinding project contains the generated binding sources > > Software used: > > Qt 4.8.4 MSVC 2010 64bit > Python 2.7 64bit > PySide 1.1.2 for Python 2.7 64bit > > To generate and test the bindigs do the following: > > 1. Install PySide > 2. Copy content of c:\Python27\Lib\site-packages\PySide to > BindingTest\PySide folder > 1. Compile FooLib project > 2. Run FooLib\generate_binding.bat > 3. Compile FooLibBinding project > 4. Run FooLibBinding\make_package.bat > 5. Go to generated folder "package" and run foolib_test.py > > [1] BindingTest.zip - > https://docs.google.com/file/d/0B0aOk3P0ndoLbkhwbWZncTlUM00/edit**** > > ** ** > > 2013/1/15 Roman Lacko <[email protected]>**** > > I will prepare simple working package for you**** > > ** ** > > 2013/1/15 ZHONG Zhu <[email protected]>**** > > Thank you for your kindly reply!**** > > I was following this tutorial but just can’t build a working binding on > Windows.**** > > Do you have any experience on building the binding on Windows?**** > > **** > > *From:* Roman Lacko [mailto:[email protected]] > *Sent:* Tuesday, January 15, 2013 4:46 PM > *To:* ZHONG Zhu > *Subject:* Re: [PySide] PySide - Qt5 - Swig**** > > **** > > I have used this tutorial to create my first bindings: > http://qt-project.org/wiki/PySide_Binding_Generation_Tutorial. it > contains downloadable package with full source.**** > > regards**** > > R.**** > > ** ** > > ** ** > > ** ** > > ** ** > > _______________________________________________ > PySide mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/pyside > > -- Simon Jagoe Enthought Ltd +44 79 312 11 506 [email protected]
_______________________________________________ PySide mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/pyside
