473,762 Members | 8,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\pytho n23.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(dll import) int __cdecl WinCE_fclose(vo id *)"
(__imp_?WinCE_f close@@YAHPAX@Z ) referenced in function "unsigned long
__cdecl PythonThread(vo id *)" (?PythonThread@ @YAKPAX@Z)

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

embedded.obj : error LNK2019: unresolved external symbol
"__declspec(dll import) void * __cdecl WinCE_fopen(cha r const *,char const
*)" (__imp_?WinCE_f open@@YAPAXPBD0 @Z) referenced in function "void *
__cdecl
OpenScriptFile( unsigned short *)" (?OpenScriptFil e@@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 3687
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\pytho n23.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(dll import) int __cdecl WinCE_fclose(vo id *)"
(__imp_?WinCE_f close@@YAHPAX@Z ) referenced in function "unsigned long
__cdecl PythonThread(vo id *)" (?PythonThread@ @YAKPAX@Z)

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

embedded.obj : error LNK2019: unresolved external symbol
"__declspec(dll import) void * __cdecl WinCE_fopen(cha r const *,char const
*)" (__imp_?WinCE_f open@@YAPAXPBD0 @Z) referenced in function "void *
__cdecl
OpenScriptFile( unsigned short *)" (?OpenScriptFil e@@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
4931
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 the occurrences of FilterType that may be relevant: ------- C:\sketch\sketch-0.7.12\Filter\filterobj.c: 949: PyTypeObject FilterType = {
0
1244
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 get unresolved references like: PySequence_DelSlice PyNumber_InPlaceXor PyInt_FromLong _PyObject_New This is just a sample, there are actually 130 of similarly named functions.
1
2589
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 fortran program using f2py. I then start an embedded python interpreter in c code which I link against the fortran program. I invoke the fortran program with a filename containing python code. This file is passed to the c code which passes it on...
0
1723
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 my Python Code I use threads to communicate over the network and stuff like this. Compilation and linking are working very well under Windows and Linux with the same code. Under the sgi, UNIX machine some errors occur and I don't no why....
5
6767
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 __imp__Py_InitModule4TraceRefs SO.lib(ScnNode.obj) : error LNK2001: unresolved external symbol __imp___Py_RefTotal
2
4140
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 that group to SQL Server logins and gave it public, datareader, and datawriter rights to the one database that's used. My front end is locked down, but I want to stop users from creating a new ..mdb and linking SQL Server tables through DSNs or...
0
1031
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 a GUI in Java, which is linked to this XIP library, to simplify the development of NL grammars. JAVA GUI IDE
13
6515
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
965
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 quite ugly. gcc ... -lgdi where gdi is a link to C++ extension imported by 'module'
0
9378
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10137
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9927
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5268
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3914
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.