Rinsed and repeated numerous times over the last few days.
I tried building from:
1) The SDK .zip file (as per faq.php)
2) The git repo (as per faq.php)
3) The git repo via Eclipse (as per jnigen.php).
For 1) and 2) I skipped build.bat and ran nmake directly from a Windows 7.1 SDK command prompt, after setting my environment variables as follows:
C:\Users\Nikolay\Downloads\org.eclipse.swt.win32.win32.x86_64.source_3.100.1.v4236b>echo %OUTPUT_DIR
%OUTPUT_DIR
C:\Users\Nikolay\Downloads\org.eclipse.swt.win32.win32.x86_64.source_3.100.1.v4236b>echo %OUTPUT_DIR%
.\out
C:\Users\Nikolay\Downloads\org.eclipse.swt.win32.win32.x86_64.source_3.100.1.v4236b>echo %CFLAGS%
-DJNI64
C:\Users\Nikolay\Downloads\org.eclipse.swt.win32.win32.x86_64.source_3.100.1.v4236b>echo %JAVA_HOME%
C:\Programs\jdk1.5.0
C:\Users\Nikolay\Downloads\org.eclipse.swt.win32.win32.x86_64.source_3.100.1.v4236b>where nmake
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\nmake.exe
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\nmake.exe
I get the following errors in the output:
C:\Users\Nikolay\Downloads\org.eclipse.swt.win32.win32.x86_64.source_3.100.1.v4236b>nmake -f make_win32.mak
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
cl -O1 -DNDEBUG -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -D_AMD64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32 -W4 -D_WINNT -D_WIN32_WINNT=0x0601 -DNTDDI_VERSION=0x06010000 -D_WIN32_IE=0x0800 -DWINVER=0x0601 -D_MT -MTd -DJNI64 -DSWT_VERSION=4236 -DUSE_ASSEMBLER /I"C:\Programs\jdk1.5.0\i
nclude" /I"C:\Programs\jdk1.5.0\include\win32" /I. os.c
os.c
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\olectl.h(205) : warning C4201: nonstandard extension used : nameless struct/union
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\msctf.h(9619) : warning C4201: nonstandard extension used : nameless struct/union
c:\users\nikolay\downloads\org.eclipse.swt.win32.win32.x86_64.source_3.100.1.v4236b\os.h(698) : error C2011: '_BP_PAINTPARAMS' : 'struct' type redefinition
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\uxtheme.h(1595) : see declaration of '_BP_PAINTPARAMS'
c:\users\nikolay\downloads\org.eclipse.swt.win32.win32.x86_64.source_3.100.1.v4236b\os.h(739) : error C2011: '_DTTOPTS' : 'struct' type redefinition
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\uxtheme.h(1441) : see declaration of '_DTTOPTS'
c:\users\nikolay\downloads\org.eclipse.swt.win32.win32.x86_64.source_3.100.1.v4236b\os_structs.h(472) : error C2143: syntax error : missing '{' before '*'
... (with many additional errors skipped) ...
This totally made sense, as the BP_PAINTPARAMS and DTTOPTS structs are defined in the SDK headers.
I tried setting the _BP_PAINTPARAMS and _DTTOPTS pre-processor macros to prevent os.h from redefining these structs, but then I get the following (totally strange) compilation errors:
C:\Users\Nikolay\Downloads\org.eclipse.swt.win32.win32.x86_64.source_3.100.1.v4236b>set CFLAGS=%CFLAGS% -D_BP_PAINTPARAMS -D_DTTOPTS
C:\Users\Nikolay\Downloads\org.eclipse.swt.win32.win32.x86_64.source_3.100.1.v4236b>echo %CFLAGS%
-DJNI64 -D_BP_PAINTPARAMS -D_DTTOPTS
C:\Users\Nikolay\Downloads\org.eclipse.swt.win32.win32.x86_64.source_3.100.1.v4236b>nmake -f make_win32.mak
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
cl -O1 -DNDEBUG -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -D_AMD64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32 -W4 -D_WINNT -D_WIN32_WINNT=0x0601 -DNTDDI_VERSION=0x06010000 -D_WIN32_IE=0x0800 -DWINVER=0x0601 -D_MT -MTd -DJNI64 -D_BP_PAINTPARAMS -D_DTTOPTS -DSWT_VERSION=4236 -DUSE_ASSEMBL
ER /I"C:\Programs\jdk1.5.0\include" /I"C:\Programs\jdk1.5.0\include\win32" /I. os.c
os.c
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\olectl.h(205) : warning C4201: nonstandard extension used : nameless struct/union
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\uxtheme.h(1440) : error C2332: 'struct' : missing tag name
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\uxtheme.h(1440) : error C2059: syntax error : 'constant'
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\uxtheme.h(1457) : warning C4431: missing type specifier - int assumed. Note: C no longer supports default-int
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\uxtheme.h(1457) : warning C4431: missing type specifier - int assumed. Note: C no longer supports default-int
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\uxtheme.h(1457) : warning C4218: nonstandard extension used : must specify at least a storage class or a type
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\uxtheme.h(1471) : warning C4431: missing type specifier - int assumed. Note: C no longer supports default-int
... (with many more omitted) ...
Any help would be greatly appreciated.
Thanks,
Nikolay