Re: compiled failed for windows (32-bit only)

  • From: Dimiter 'malkia' Stanev <malkia@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 11 Jun 2012 16:41:07 -0700

On 6/11/2012 3:55 PM, Mike Pall wrote:
Dimiter 'malkia' Stanev wrote:
On 6/11/2012 2:38 PM, Mike Pall wrote:
Dimiter 'malkia' Stanev wrote:
This is with Windows WDK 7.1, but possibly won't work with msvc/32-bit

buildvm_peobj.c
e:\p\luajit\src\host\buildvm_arch.h(1202) : error C2039: 'nfpr' : is
not a member of 'CCallState'
         E:\p\luajit\src\lj_ccall.h(125) : see declaration of 'CCallState'
Works for me with the Windows SDK 7.0.

Please start a Windows SDK Command Shell prompt and try:

   echo %CPU%
   echo %PROCESSOR_ARCHITECTURE%

--Mike
But I'm using WDK, not SDK. Seems easy to fix it on my side.
Btw, I think it's TARGET_CPU and not CPU (at least from the Windows
SDK 7.1 setenv.bat)
Well, I could check for TARGET_CPU, too. But before I change that,
please actually try both echo %TARGET_CPU% and echo %CPU% in your
environment.

And PROCESSOR_ARCHITECTURE should be set to the current process bitness,
which would be cmd.exe in this case, and on my machine (Windows 7
64-bit) it's AMD64.
Not sure I should fall back to that. But if neither CPU, nor
TARGET_CPU is set, I'd assume it's an ancient MSVC installation
and then it's probably x86 (and not x64).

--Mike


Oh, man... what a mess are the Windows SDK's.

So here are the results:

SDK 7.0 setenv /x86
CPU=[i386]
TARGET_CPU=[]
PROCESSOR_ARCHITECTURE=[AMD64]

SDK 7.0 setenv /x64
CPU=[AMD64]
TARGET_CPU=[]
PROCESSOR_ARCHITECTURE=[AMD64]

SDK 7.1 setenv /x86
CPU=[]
TARGET_CPU=[x86]
PROCESSOR_ARCHITECTURE=[AMD64]

SDK 7.1 setenv /x64
CPU=[]
TARGET_CPU=[x64]
PROCESSOR_ARCHITECTURE=[AMD64]

WDK 7.1 (Windows XP x86 Free Build Environment)
CPU=[AMD64]
TARGET_CPU=[]
PROCESSOR_ARCHITECTURE=[AMD64]

WDK 7.1 (Windows 7 x64 Free Build Environment)
CPU=[AMD64]
TARGET_CPU=[]
PROCESSOR_ARCHITECTURE=[AMD64]

So it's a total mess.
I can deal with this, as I guess there are not many people using the WDK, and I've already made a tweak to compile just fine.


Other related posts: