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
  Python C Extension Module loading issue on Cygwin mesibo 0 639 Sep-22-2023, 05:41 AM
Last Post: mesibo
  Cross 2 arrays dylan261999 4 1,017 Feb-09-2023, 01:06 PM
Last Post: thensun
  Python-for-Android:p4a: syntax error in main.py while compiling apk jttolleson 2 1,823 Sep-17-2022, 04:09 AM
Last Post: jttolleson
  Compiling (PyInstaller issues) TheHolyPyGrenade 1 1,898 Apr-11-2021, 08:30 PM
Last Post: snippsat
  Compiling SlicerCAT flaviu2 1 1,841 Sep-21-2020, 08:38 AM
Last Post: buran
  Compiling Python 3.8.5 source code results in build error Deepan 0 2,173 Sep-14-2020, 04:11 AM
Last Post: Deepan
  Compiling on win10 ebolisa 1 1,745 Sep-04-2020, 04:39 PM
Last Post: ebolisa
  Can't open/read txt file in C extension for Python Rad226 8 4,753 Jun-26-2020, 04:08 PM
Last Post: Rad226
  How to make chrome extension in python? Hassibayub 1 2,719 May-06-2020, 04:17 PM
Last Post: DeaD_EyE
  Compiling to windows installer DT2000 1 1,552 May-04-2020, 09:17 PM
Last Post: DT2000

Forum Jump:

User Panel Messages

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