1

I'm trying to make a cross compilation of my c++ qt project using MXE. The environment is well configured and works fine, but not if there are a python code in.

My goal is build a static exe for Windows of my project under linux.

Actually, there is a similar question, but it's not the same...and it isn't answered.

There are some errors like that:

/usr/include/python3.6m/pyconfig.h:104:3: error: #error unknown multiarch location for pyconfig.h

Searching in pyconfig.h I can read:

(more architectures but not windows)
...
#elif defined(__gnu_hurd__)
# include <i386-gnu/python3.6m/pyconfig.h>
#else
# error unknown multiarch location for pyconfig.h
#endif

I understand that there aren't windows plattform defined and therefore I suppose that I may compile a static version of python for windows but I'm not sure.

Then, ¿whats is exactly my mistake and how could I to resolve it?

user3733164
  • 531
  • 4
  • 17
  • 1
    Why don't you just compile *for* Windows *on* Windows? Much easier. Set up a physical or virtual machine and add it to your Continuous Integration system. – Jesper Juhl Aug 15 '19 at 16:29
  • 1
    as for me it has only information for Linux/Unix distributions. You would have to add Python's C/C++ headers for Windows and add path to `pyconfig.h` in place of `"error unknown multiarch location for pyconfig.h`"` – furas Aug 15 '19 at 16:38
  • 1
    See https://stackoverflow.com/questions/56266695/how-to-cross-compile-python-interpreter-for-windows-under-linux/57513654#57513654 – ivan_pozdeev Aug 15 '19 at 17:24
  • @JesperJuhl, I always have this possibility, but I would like to explore the chance to manage diferents kits into my Qt Creator and complie for diferent architectures only changing them and pushing a button :) – user3733164 Aug 15 '19 at 17:47
  • @ivan_pozdeev, I have a few idea about that, but....could be this a start point? https://mdqinc.com/blog/2011/10/cross-compiling-python-for-windows-with-mingw32/ or definitively I can to forget this idea? – user3733164 Aug 15 '19 at 17:48
  • @user3733164 see an update to the answer there. I believe Anaconda adds support privately. That's a much better "starting point" if you ask me :-) – ivan_pozdeev Aug 15 '19 at 17:49
  • @ivan_pozdeev, it looks very dificult to me, but...now I have any entertaiment for this weekend yet. Thx! :-) – user3733164 Aug 15 '19 at 18:03

0 Answers0