Hi,
I'm trying to build a c extension module for python.
I've used the python pakage provided by msys2 and it comes with python-config
utility.
$ gcc $(python-config --cflags ) -shared  example.c  -o _example.pyd
In file included from C:/msys64/mingw64/include/python2.7/Python.h:58:0,
                from example.c:2:
C:/msys64/mingw64/include/python2.7/pyport.h:907:2: error: #error "LONG_BIT
definition appears wrong for platform (bad gcc/glibc config?)."
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc
config?)."
 ^

the flags  issued by python-config are the following ones :
$ python-config --cflags
-IC:/msys64/mingw64/include/python2.7 -IC:/msys64/mingw64/include/python2.7
-fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fwrapv
-D__USE_MINGW_ANSI_STDIO=1 -DNDEBUG -DNDEBUG

It seems that something is wrong arround the Python header files.

However , it is clear that this is a misuse of my part  because a lot of c
modules are provided by msys2

How to proceed to build a c module ?

Regards

Michel

PS :
hereafter the content of example.c ..... :)
#include <stdio.h>
#include <Python.h>

int main()
{
 return(0);
}

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to