Python Forum
Python with C extension cross compiling
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python with C extension cross compiling
#1
Hello,

I am fairly new to Python and extensions but I am working on an application that is working great on my Windows PC but I am having a hard to getting it onto my Raspberry Pi. I wrote Python code with an extension that calls in header files from a supplier to control a motor. It all works great on my PC but when I move it over to my Pi, it throws all these header exceptions (mostly windows specifics, wtypes, tchar, etc..). So I am curious if anyone can chime in on how I am to cross compile this? I know bascially I need to call a different compilier or port the code over.

Thoughts?

Thanks,
Greg
Reply
#2
Quote: it throws all these header exceptions
show them, use error tags
Reply
#3
Here is the main error.

Error:
./Includes/_mingw.h:264:2: error: #error Only Win32 target is supported! #error Only Win32 target is supported!
After that area that are about a 100 not defined because that first error doesn't load
Reply
#4
always show the entire error. It contains important information about execution prior to encountering the actual error.
That said, raspberry is running Linux, correct?
so you won't be using mingw, probably gcc.
you need to check for a Linux version, or specifically for a Raspberry Pi version.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  'Un-compiling' an .exe ? Stephen_8069 1 486 Apr-07-2025, 11:54 AM
Last Post: buran
  Create a new subclass in a Python extension based on an existing class voidtrance 6 1,407 Mar-25-2025, 06:37 PM
Last Post: voidtrance
  How to re-register .py file extension to new moved Python dir (on Windows)? pstein 5 1,349 Nov-06-2024, 03:06 PM
Last Post: DeaD_EyE
  Python C Extension Module loading issue on Cygwin mesibo 0 1,390 Sep-22-2023, 05:41 AM
Last Post: mesibo
  Cross 2 arrays dylan261999 4 2,099 Feb-09-2023, 01:06 PM
Last Post: thensun
  Python-for-Android:p4a: syntax error in main.py while compiling apk jttolleson 2 4,028 Sep-17-2022, 04:09 AM
Last Post: jttolleson
  Compiling (PyInstaller issues) TheHolyPyGrenade 1 2,630 Apr-11-2021, 08:30 PM
Last Post: snippsat
  Compiling SlicerCAT flaviu2 1 2,599 Sep-21-2020, 08:38 AM
Last Post: buran
  Compiling Python 3.8.5 source code results in build error Deepan 0 2,741 Sep-14-2020, 04:11 AM
Last Post: Deepan
  Compiling on win10 ebolisa 1 2,307 Sep-04-2020, 04:39 PM
Last Post: ebolisa

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020