Python Forum
Is there a problem with LONG_BIT in pyconfig.h ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a problem with LONG_BIT in pyconfig.h ?
#2
I'm not familiar with pybind11 but I have written some C extensions for Windows.

The standard ABI for Windows defines a C long as 32 bits on both 32-bit and 64-bit versions of Windows. The "long long" type is defined as 64 bits. This standard is followed by the Microsoft Visual Studio compilers which are used to compile the binaries that are downloaded from python.org.

IIRC, the cygwin64 compiler defines a C long at 64 bits. That compiler should work with there own version of Python but won't work with a standard 64-bit Windows binary. That is probably the source of the problem.

I generally use either the free (to download) Microsoft compilers or MSYS2 and the mingw64 compiler.

casevh
Reply


Messages In This Thread
RE: Is there a problem with LONG_BIT in pyconfig.h ? - by casevh - Mar-05-2018, 06:25 AM

Forum Jump:

User Panel Messages

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