[PythonCE] compiling for winCE

Ajay abra9823 at mail.usyd.edu.au
Sat Sep 4 06:13:29 CEST 2004


hi!

i tried using SWIG and both my .ccp and wrap.cpp compiled fine. however
when i try to link them i get an error

Linking...
   Creating library ARMRel/mytest1.lib and object ARMRel/mytest1.exp
mytest_wrap.obj : error LNK2019: unresolved external symbol "int __cdecl
incrementNumber(int)" (?incrementNumber@@YAHH at Z) referenced in function
_wrap_incrementNumber
ARMRel/mytest1.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

mytest1.dll - 2 error(s), 0 warning(s)

i have no idea where the error is coming from

help would be much appreciated

cheers


Quoting Huy <huymail at swiftdsl.com.au>:

> Ajay wrote:
> > hi!
> >
> > would people who have successfully ported packages to pocket pc please
> post
> > a howto/guide to porting a package to pocket pc?
> >
> > what do you need to do? what do you need in to set up in the build
> > environment?
> >
> > please help
>
> I don't know about porting other packages but I have written my own
> python extensions using embedded c++ 4.0 for pocket pc 2003 running on
> the python 2.3.4. At the moment I'm using it for things which win32gui
> does not fully support eg. SHFullScreen SIPShowIM etc.
>
> Here are the steps I took to get it to work on the platform above.
>
> 1. Install Embedded Visual Tools C++ 4.0
> 2. Install Embedded Visual Tools C++ 4.0 SP3
> 3. Install Pocket PC 2003 SDK
> (these files can be downloaded from microsoft web site)
> 4. Create new project in EVC (Dymanic Link Library).
> 5. Write your C/C++ code to do whatever it is you want to do. Don't
> worry about interfacing it with python. Write it as if you are using it
> standalone.
> 6. Compile it and make sure it is all working.
>
> 7. Install the python source code
> 8. Install the pythonce source code (overlay on top of python source)
> 9. Build pythonce following instructions on David Kashtans' site.
> http://fore.validus.com/~kashtan/
>
> 10. Install SWIG. See the tutorial on their site for a quick run down on
> how to get it too work with your C++ code and python. Basically you need
> to write an interface file eg. if you have source file modulename.cpp
> then create a file called modulename.i and chuck stuff in that (see the
> tutorial for details)
>
> run swig on your interface file as follows:
> swig.exe -python -shadow -o modulename_wrap.cpp modulename.i
>
> This will generate the source_wrap.cpp file which you now need to add to
> your evc4 project.
>
> In you evc4 project settings,
> 1. go to the c/c++ tab and add the following to the project options box.
> /I "PYTHON_SOURCE_ROOT/Include" /I "PYTHON_SOURCE_ROOT/PC/WinCE"
>
> 2. go to the link tab and change your dll output file name to
> _modulename.pyd (pyd files are the dll files with a pyd extension; i
> didn't know this until today). Now build the project and hopefully you
> should have a _modulename.pyd file in your build directory.
>
> Now move the files
> _modulename.pyd and modulename.py (this file is generated by swig when
> issuing the -shadow command) to your pocket pc python lib directory.
>
> You should now be able to import the module in your python programs.
>
> This is my first try at both writing a python extension as well as
> playing with pythonce so if any of the veterans on the list could give
> me any extra pointers, I would be most grateful.
>
> Huy
>
>


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


More information about the PythonCE mailing list