Linking to Python for Windows CE

M

Martin Evans

I've just been tasked with porting our desktop embedded Python support
onto our existing CE offering. I've managed to compile the Python
sources and have produced an armdbg420\python23.lib file.

When I come to link to the Python library though from our one of our
DLLs, I am getting the following unresolved externals:

-------------------
embedded.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) int __cdecl WinCE_fclose(void *)"
(__imp_?WinCE_fclose@@YAHPAX@Z) referenced in function "unsigned long
__cdecl PythonThread(void *)" (?PythonThread@@YAKPAX@Z)

embedded.obj : error LNK2019: unresolved external symbol __imp_LoadLibraryU
referenced in function "unsigned long __cdecl PythonThread(void *)"
(?PythonThread@@YAKPAX@Z)

embedded.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) void * __cdecl WinCE_fopen(char const *,char const
*)" (__imp_?WinCE_fopen@@YAPAXPBD0@Z) referenced in function "void *
__cdecl
OpenScriptFile(unsigned short *)" (?OpenScriptFile@@YAPAXPAG@Z)

-------------------

python23.lib does have entries for WinCE_fopen (part of
wince-compatibility.c) when looking at the lib file using dumpbin (all
are undecorated). Have I missed some vital step in producing it?


Just to clarify my environment, I am producing a PocketPC 2003
application that embeds Python, scripts are launched within our
application with script output displayed in our own output window. We
also provide our own Python extension library. All works on ok on the
desktop version.

Any help would gratefully appreciated. Thanks.

Martin
 
M

Martin Evans

Sorry, false alarm. It turned out one of my own files was using
fopen/fclose and this was upseting things. After removing those it
linked fine.
 
F

Fuzzyman

There are modified Python sources for Windows CE via the sourceforge
site :

http://sourceforge.net/projects/pythonce

There is now a rudimentary website :

http://pythonce.sf.net

It seems like this project now has traction again. The source has to be
'hacked' quite a bit to compile for Windows CE and there was concern
about moving the macros required to do this into the main source, which
is why it is a separate project.

The current latest version is 2.3.5 - but this may change soon.

All the best,

Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top