Hi Wiliam,


Thanks for your answer. I followed the rules for Windows but nevertheless got these errors.
For me it seems that the examples of swig 2.0.3 have some problem with Python 3.2 (as in the examples an older version of Python is referenced).
Do you know if any sample can be built for Python 3.2 ?






From:        William S Fulton <wsf@fultondesigns.co.uk>
To:        TBruendl@hidglobal.com
Cc:        swig-user@lists.sourceforge.net
Date:        28.04.2011 23:08
Subject:        Re: [Swig-user] Problems with python samples under Windows
Sent by:        William Fulton <william@fultondesigns.co.uk>




On 28/04/11 16:18, TBruendl@hidglobal.com wrote:
> Hi,
>
>
> I have installed Python 3.2 and swig 2.0.3 under Windows XP.
> When I try to build the release version of the python/simple sample, I
> get following linker error.
>
>
> C:\prog\swigwin-2.0.3\Examples\python\simple\example_wrap.c(2427) :
> warning C4013: 'PyCObject_Import' undefined; assuming extern returning int
> C:\prog\swigwin-2.0.3\Examples\python\simple\example_wrap.c(2428) :
> warning C4047: '=' : 'void *' differs in levels of indirection from 'int '
> C:\prog\swigwin-2.0.3\Examples\python\simple\example_wrap.c(2498) :
> warning C4013: 'PyCObject_FromVoidPtr' undefined; assuming extern
> returning int
> C:\prog\swigwin-2.0.3\Examples\python\simple\example_wrap.c(2498) :
> warning C4047: 'initializing' : 'struct _object *' differs in levels of
> indirection from 'int '
> C:\prog\swigwin-2.0.3\Examples\python\simple\example_wrap.c(2521) :
> warning C4013: 'PyCObject_AsVoidPtr' undefined; assuming extern
> returning int
> C:\prog\swigwin-2.0.3\Examples\python\simple\example_wrap.c(2526) :
> warning C4047: '=' : 'struct _object *' differs in levels of indirection
> from 'int '
> Linking...
> Creating library Release/_example.lib and object Release/_example.exp
> example_wrap.obj : error LNK2001: unresolved external symbol
> _PyCObject_Import
> example_wrap.obj : error LNK2001: unresolved external symbol
> _PyCObject_FromVoidPtr
> _example.pyd : fatal error LNK1120: 2 unresolved externals
> Error executing link.exe.
>
>
> Is there any way to build this sample ?
>
Follow the instructions at
http://www.swig.org/Doc2.0/Windows.html#Windows_examples

William


------------------------------------------------------------
Confidentiality Note:
This message is intended for use only by the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. Thank you.