473,385 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Linking to Python for Windows CE

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

Jan 16 '06 #1
3 3660
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.

Martin Evans wrote:
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


Jan 16 '06 #2
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

Jan 16 '06 #3
Hmmm... looks like you're already using this. Sorry.

All the best,

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

Jan 16 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Joonas Paalasmaa | last post by:
Hi, When compiling Sketch's streamfilter C extension the errors below are raised during linking. What could cause the errors? (Python 2.3, MinGw 1.1 with GCC 2.95.3-6, Windows 98) Here are...
0
by: Jeffrey Holle | last post by:
I am working on a Linux system using gcc v3.3 and python v2.3.2 I have a problem linking a cpp program to a shared library that uses the Python C API. With just referencing this shared library, I...
1
by: Jeff Hagelberg | last post by:
I'm trying to create a python module which can be used by a python interpreter embedded inside a fortran program I have. To do this, I first created python wrappers for all the functions in my...
0
by: Wolfgang | last post by:
I have a problem with linking my CPP Code under a irix6 machine (sgi, UNIX). In my CPP code I use some Functions which are written in Python. So its a kind of CPP wrapper for my Python functions In...
5
by: J | last post by:
Hi everyone, I started embedding python into a 3D graphics App and I came across this linking problem. SO.lib(ScnGlobal.obj) : error LNK2001: unresolved external symbol...
2
by: Matthew Wells | last post by:
Good morning... I have an Access front end that uses SQL Server linked tables. SQL Server uses Windows authentication. I have one Windows group that all Access users are a member of. I added...
0
by: Roux Claude | last post by:
Bonjour, We have implemented Python as an "embedded script language" in our NLP application, XIP which a grammar rule engine written in C++ and available as a library. We have also developped...
13
by: 7stud | last post by:
test1.py: -------------------- import shelve s = shelve.open("/Users/me/2testing/dir1/aaa.txt") s = "red" s.close() --------output:------ $ python test1.py
0
by: Martin Landa | last post by:
Hi, I am writing Python extension in C++, in this extension I am using methods from another Python extension. On Linux I am currently linking my extension with used Python extension -- what is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.