Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » problem building SWT JNI
problem building SWT JNI [message #663949] Wed, 06 April 2011 22:06 Go to next message
Frederick Sawyer is currently offline Frederick SawyerFriend
Messages: 7
Registered: April 2011
Junior Member
Where is the "JNI Generator" referenced in the build instructions? It's not in the SWT tools directory. Also, where does the "win32.mak" files referenced by "make_win32.mak" come from????
Re: problem building SWT JNI [message #664073 is a reply to message #663949] Thu, 07 April 2011 12:20 Go to previous messageGo to next message
Lakshmi P ShanmugamFriend
Messages: 279
Registered: July 2009
Location: India
Senior Member
When you install the SWT tools, the JNI Generator is installed. And it runs in the background to generate the JNI code when required. See this page for more info --> http://eclipse.org/swt/jnigen.php

Lakshmi P Shanmugam
Re: problem building SWT JNI [message #664176 is a reply to message #664073] Thu, 07 April 2011 17:56 Go to previous messageGo to next message
Frederick Sawyer is currently offline Frederick SawyerFriend
Messages: 7
Registered: April 2011
Junior Member
that's the link I have been looking at, the "SWT Tools Update Sites" link is dead.

And http://www.eclipse.org/swt/faq.php#howbuilddll says to unzip " <eclipseRoot>/plugins/org.eclipse.swt.<ws>.<os>.<arch>.source_X.X.X. <versionString>.zip " and I cannot find this file anywhere.

Is it embedded in another zip or has the filename changed?
Re: problem building SWT JNI [message #664187 is a reply to message #664176] Thu, 07 April 2011 19:09 Go to previous messageGo to next message
Frederick Sawyer is currently offline Frederick SawyerFriend
Messages: 7
Registered: April 2011
Junior Member
I found it....now I am trying to figure out how to configure the build.bat file and whatever environment variables I need to set. You guys really do not make this easy....
Re: problem building SWT JNI [message #664220 is a reply to message #664187] Thu, 07 April 2011 21:29 Go to previous messageGo to next message
Carlo Salinari is currently offline Carlo SalinariFriend
Messages: 66
Registered: October 2010
Member
On 4/7/2011 9:09 PM, Frederick Sawyer wrote:
> I found it....now I am trying to figure out how to configure the build.bat file and whatever environment variables I need to set. You guys really do not make this easy....

I've gone through this a few weeks ago. The build system assumes you are
using windows sdk 2003 sp1 (free download, google it). Took me a while
to discover that.

Here are the steps I noted down:
- run the sdk setup as Administrator, otherwise it will fail the final
step of customizing the setenv command
- choose Complete installation (otherwise some includes will be missing)
- put
set MSSDK="C:\Program Files\Microsoft Platform SDK"
in build.bat
- I had to modify make_win32.mak
# AWT_LIBS = "$(JAVA_HOME)\jre\bin\jawt.lib"
AWT_LIBS = "$(JAVA_HOME)\lib\jawt.lib"

I'm curious, why are you playing with swt-jni?

Cheers,
Carlo
Re: problem building SWT JNI [message #664221 is a reply to message #664220] Thu, 07 April 2011 21:45 Go to previous messageGo to next message
Frederick Sawyer is currently offline Frederick SawyerFriend
Messages: 7
Registered: April 2011
Junior Member
looking into adding Windows 7 multi-touch support into SWT. I need to use visual studio 10.0 for the header files for this feature, will "windows sdk 2003 sp1" still work?
Re: problem building SWT JNI [message #664228 is a reply to message #664221] Thu, 07 April 2011 22:26 Go to previous messageGo to next message
Carlo Salinari is currently offline Carlo SalinariFriend
Messages: 66
Registered: October 2010
Member
On 4/7/2011 11:45 PM, Frederick Sawyer wrote:
> looking into adding Windows 7 multi-touch support into SWT. I need to use visual studio 10.0 for the header files for this feature, will "windows sdk 2003 sp1" still work?

Sorry, I have no idea. Surely the swt-jni build system needs some love.
Re: problem building SWT JNI [message #664242 is a reply to message #664228] Fri, 08 April 2011 01:07 Go to previous messageGo to next message
Frederick Sawyer is currently offline Frederick SawyerFriend
Messages: 7
Registered: April 2011
Junior Member
ok, it doesn't look like I can install the 2003 SDK on Windows 7; the installer reports an error and halts.

So I installed the latest and greatest and now I am trying to get it to work with Dev Studio 10.....and I get the following errors:

C:\SWT JNI>IF x.x86 == x.x86 GOTO X86

C:\SWT JNI>IF x. == x.true GOTO XULRUNNER

C:\SWT JNI>call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat"
Setting environment for using Microsoft Visual Studio 2010 x86 tools.

C:\SWT JNI>call C:\Program Files\Microsoft SDKs\Windows\v7.0\setenv /XP32 /RETAIL

C:\SWT JNI>IF x.x86 == x.x86 shift

C:\SWT JNI>GOTO MAKE

C:\SWT JNI>nmake -f make_win32.mak
cl -O1 -DNDEBUG -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -D_X86_=1 -DWIN32 -D_WIN32 -W3 -D_WINNT -D_WIN32_WINNT=0x0500 -DNTDDI_VERSION=0x05000000 -D_WIN32_IE=0x0500 -DWINVER=0x0500 -D_MT -MTd -DSWT_VERSION=3659 -DUSE_ASSEMBLER /I"C:\Program Files (x86)\Java\jdk1.6.0_24\include" /I"C:\Program Files (x86)\Java\jdk1.6.0_24\include\win32" /I. os.c
os.c
c:\swt jni\os_structs.h(100) : error C2143: syntax error : missing '{' before '*'
c:\swt jni\os_structs.h(100) : error C2143: syntax error : missing ')' before '*'
c:\swt jni\os_structs.h(100) : error C2081: 'BUTTON_IMAGELIST' : name in formal parameter list illegal
c:\swt jni\os_structs.h(100) : error C2143: syntax error : missing '{' before '*'
c:\swt jni\os_structs.h(100) : error C2059: syntax error : ')'
c:\swt jni\os_structs.h(101) : error C2143: syntax error : missing ')' before '*'
c:\swt jni\os_structs.h(101) : error C2081: 'BUTTON_IMAGELIST' : name in formal parameter list illegal
c:\swt jni\os_structs.h(101) : error C2143: syntax error : missing '{' before '*'
c:\swt jni\os_structs.h(101) : error C2059: syntax error : ')'
c:\swt jni\os_structs.h(508) : error C2143: syntax error : missing '{' before '*'
c:\swt jni\os_structs.h(508) : error C2143: syntax error : missing ')' before '*'
c:\swt jni\os_structs.h(508) : error C2081: 'LITEM' : name in formal parameter list illegal
c:\swt jni\os_structs.h(508) : error C2143: syntax error : missing '{' before '*'
c:\swt jni\os_structs.h(508) : error C2059: syntax error : ')'
c:\swt jni\os_structs.h(509) : error C2143: syntax error : missing ')' before '*'
c:\swt jni\os_structs.h(509) : error C2081: 'LITEM' : name in formal parameter list illegal
c:\swt jni\os_structs.h(509) : error C2143: syntax error : missing '{' before '*'
c:\swt jni\os_structs.h(509) : error C2059: syntax error : ')'
c:\swt jni\os_structs.h(604) : error C2143: syntax error : missing '{' before '*'
c:\swt jni\os_structs.h(604) : error C2143: syntax error : missing ')' before '*'
c:\swt jni\os_structs.h(604) : error C2081: 'LVINSERTMARK' : name in formal parameter list illegal
c:\swt jni\os_structs.h(604) : error C2143: syntax error : missing '{' before '*'
c:\swt jni\os_structs.h(604) : error C2059: syntax error : ')'
c:\swt jni\os_structs.h(605) : error C2143: syntax error : missing ')' before '*'
c:\swt jni\os_structs.h(605) : error C2081: 'LVINSERTMARK' : name in formal parameter list illegal
c:\swt jni\os_structs.h(605) : error C2143: syntax error : missing '{' before '*'
c:\swt jni\os_structs.h(605) : error C2059: syntax error : ')'
c:\swt jni\os_structs.h(784) : error C2143: syntax error : missing '{' before '*'
c:\swt jni\os_structs.h(784) : error C2143: syntax error : missing ')' before '*'
c:\swt jni\os_structs.h(784) : error C2081: 'NMLINK' : name in formal parameter list illegal
c:\swt jni\os_structs.h(784) : error C2143: syntax error : missing '{' before '*'
c:\swt jni\os_structs.h(784) : error C2059: syntax error : ')'
c:\swt jni\os_structs.h(785) : error C2143: syntax error : missing ')' before '*'
c:\swt jni\os_structs.h(785) : error C2081: 'NMLINK' : name in formal parameter list illegal
c:\swt jni\os_structs.h(785) : error C2143: syntax error : missing '{' before '*'
c:\swt jni\os_structs.h(785) : error C2059: syntax error : ')'
os.c(374) : error C2065: 'BUTTON_IMAGELIST' : undeclared identifier
os.c(7673) : error C2065: 'LITEM' : undeclared identifier
os.c(7785) : error C2065: 'LVINSERTMARK' : undeclared identifier
os.c(9846) : error C2065: 'NMLINK' : undeclared identifier
os.c(9846) : error C2146: syntax error : missing ';' before identifier '_arg0'
os.c(9846) : error C2065: '_arg0' : undeclared identifier
os.c(9846) : error C2065: 'lparg0' : undeclared identifier
os.c(9846) : error C2100: illegal indirection
os.c(9846) : warning C4047: '=' : 'int' differs in levels of indirection from 'void *'
os.c(9852) : error C2065: 'lparg0' : undeclared identifier
os.c(9852) : error C2065: '_arg0' : undeclared identifier
os.c(9852) : warning C4047: '=' : 'int' differs in levels of indirection from 'int *'
os.c(9852) : warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
os.c(9853) : error C2065: 'lparg0' : undeclared identifier
os.c(9855) : error C2065: 'lparg0' : undeclared identifier
os.c(9855) : warning C4013: 'setNMLINKFields' undefined; assuming extern returning int
os.c(9855) : error C2065: 'lparg0' : undeclared identifier
os.c(11148) : error C2065: 'NMLINK' : undeclared identifier
os.c(13704) : error C2065: 'BUTTON_IMAGELIST' : undeclared identifier
os.c(13704) : error C2146: syntax error : missing ';' before identifier '_arg3'
os.c(13704) : error C2065: '_arg3' : undeclared identifier
os.c(13704) : error C2065: 'lparg3' : undeclared identifier
os.c(13704) : error C2100: illegal indirection
os.c(13704) : warning C4047: '=' : 'int' differs in levels of indirection from 'void *'
os.c(13705) : error C2275: 'jint' : illegal use of this type as an expression
C:\Program Files (x86)\Java\jdk1.6.0_24\include\win32\jni_md.h(15) : see declaration of 'jint'
os.c(13705) : error C2146: syntax error : missing ';' before identifier 'rc'
os.c(13705) : error C2065: 'rc' : undeclared identifier
os.c(13711) : error C2065: 'lparg3' : undeclared identifier
os.c(13711) : warning C4013: 'getBUTTON_IMAGELISTFields' undefined; assuming extern returning int
os.c(13711) : error C2065: '_arg3' : undeclared identifier
os.c(13711) : warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
os.c(13712) : error C2065: 'rc' : undeclared identifier
os.c(13712) : error C2065: 'lparg3' : undeclared identifier
os.c(13714) : error C2065: 'lparg3' : undeclared identifier
os.c(13714) : warning C4013: 'setBUTTON_IMAGELISTFields' undefined; assuming extern returning int
os.c(13714) : error C2065: 'lparg3' : undeclared identifier
os.c(13720) : error C2065: 'rc' : undeclared identifier
os.c(13812) : error C2065: 'LITEM' : undeclared identifier
os.c(13812) : error C2146: syntax error : missing ';' before identifier '_arg3'
os.c(13812) : error C2065: '_arg3' : undeclared identifier
os.c(13812) : error C2065: 'lparg3' : undeclared identifier
os.c(13812) : error C2100: illegal indirection
os.c(13812) : warning C4047: '=' : 'int' differs in levels of indirection from 'void *'
os.c(13813) : error C2275: 'jint' : illegal use of this type as an expression
C:\Program Files (x86)\Java\jdk1.6.0_24\include\win32\jni_md.h(15) : see declaration of 'jint'
os.c(13813) : error C2146: syntax error : missing ';' before identifier 'rc'
os.c(13813) : error C2065: 'rc' : undeclared identifier
os.c(13819) : error C2065: 'lparg3' : undeclared identifier
os.c(13819) : warning C4013: 'getLITEMFields' undefined; assuming extern returning int
os.c(13819) : error C2065: '_arg3' : undeclared identifier
os.c(13819) : warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
os.c(13820) : error C2065: 'rc' : undeclared identifier
os.c(13820) : error C2065: 'lparg3' : undeclared identifier
os.c(13822) : error C2065: 'lparg3' : undeclared identifier
os.c(13822) : warning C4013: 'setLITEMFields' undefined; assuming extern returning int
os.c(13822) : error C2065: 'lparg3' : undeclared identifier
os.c(13828) : error C2065: 'rc' : undeclared identifier
os.c(13893) : error C2065: 'LVINSERTMARK' : undeclared identifier
os.c(13893) : error C2146: syntax error : missing ';' before identifier '_arg3'
os.c(13893) : error C2065: '_arg3' : undeclared identifier
os.c(13893) : error C2065: 'lparg3' : undeclared identifier
os.c(13893) : error C2100: illegal indirection
os.c(13893) : warning C4047: '=' : 'int' differs in levels of indirection from 'void *'
os.c(13894) : error C2275: 'jint' : illegal use of this type as an expression
C:\Program Files (x86)\Java\jdk1.6.0_24\include\win32\jni_md.h(15) : see declaration of 'jint'
os.c(13894) : error C2146: syntax error : missing ';' before identifier 'rc'
os.c(13894) : error C2065: 'rc' : undeclared identifier
os.c(13900) : error C2065: 'lparg3' : undeclared identifier
os.c(13900) : warning C4013: 'getLVINSERTMARKFields' undefined; assuming extern returning int
os.c(13900) : error C2065: '_arg3' : undeclared identifier
os.c(13900) : warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
os.c(13901) : error C2065: 'rc' : undeclared identifier
os.c(13901) : error C2065: 'lparg3' : undeclared identifier
os.c(13903) : error C2065: 'lparg3' : undeclared identifier
os.c(13903) : warning C4013: 'setLVINSERTMARKFields' undefined; assuming extern returning int
os.c(13903) : error C2065: 'lparg3' : undeclared identifier
os.c(13909) : error C2065: 'rc' : undeclared identifier
os.c(14621) : error C2065: 'BUTTON_IMAGELIST' : undeclared identifier
os.c(14621) : error C2146: syntax error : missing ';' before identifier '_arg3'
os.c(14621) : error C2065: '_arg3' : undeclared identifier
os.c(14621) : error C2065: 'lparg3' : undeclared identifier
os.c(14621) : error C2100: illegal indirection
os.c(14621) : warning C4047: '=' : 'int' differs in levels of indirection from 'void *'
os.c(14622) : error C2275: 'jint' : illegal use of this type as an expression
C:\Program Files (x86)\Java\jdk1.6.0_24\include\win32\jni_md.h(15) : see declaration of 'jint'
os.c(14622) : fatal error C1003: error count exceeds 100; stopping compilation
Re: problem building SWT JNI [message #664243 is a reply to message #664242] Fri, 08 April 2011 01:08 Go to previous messageGo to next message
Frederick Sawyer is currently offline Frederick SawyerFriend
Messages: 7
Registered: April 2011
Junior Member
it appears to be having a problem resolving "BUTTON_IMAGELIST"
Re: problem building SWT JNI [message #664407 is a reply to message #664242] Fri, 08 April 2011 16:48 Go to previous messageGo to next message
Carlo Salinari is currently offline Carlo SalinariFriend
Messages: 66
Registered: October 2010
Member
On 4/8/2011 3:07 AM, Frederick Sawyer wrote:
> ok, it doesn't look like I can install the 2003 SDK on Windows 7; the installer reports an error and halts.

I did install it under Win 7 64 bit.
Re: problem building SWT JNI [message #664449 is a reply to message #664407] Fri, 08 April 2011 22:50 Go to previous messageGo to next message
Frederick Sawyer is currently offline Frederick SawyerFriend
Messages: 7
Registered: April 2011
Junior Member
ok, so for 2 days now I have been openeing up this huge can or worms that started out as a simple process as documented on the Eclipse site to build the SWT JNI.....2 days later and I am still trying to get the Eclipse project confugured so that I can build/run the JNIGeneratorApp. THIS IS RIDICULOUS!!!!!! Does anyone have a detailed and accurate set of instructions of what is required to build the SWT JNI and any additional steps what will be necessary should I want to modify the JNI?????

I realize this is a public domain project but give me a break....if the documentation is incomplete and the steps are complicated then at least say so up front....and I thought Microsoft had poor documentation..... Sad
Re: problem building SWT JNI [message #664629 is a reply to message #664449] Mon, 11 April 2011 13:07 Go to previous message
Lakshmi P ShanmugamFriend
Messages: 279
Registered: July 2009
Location: India
Senior Member
It is not clear from your previous post what is the error/problem you are seeing.
So, here are the steps:

1) If you have installed the SWT Tools, the JNIGenerator runs in the background and automatically generates the JNI code as and when required. The required C files are generated.

2) SWT uses "Windows Server 2003 SP1 SDK" to compile its Windows libraries. After you have it on your system, modify %MSSDK% in build.bat to point to it. Also set the correct path for vsvars32.bat in build.bat.

3) Find the build.xml under tasks/build.xml. Choose "Run As -> Ant Build...". Select the JRE tab, and check "Run in the same JRE as the workspace". Select the target in the targets tab based on your platform (for eg: build_win32_x86)


Lakshmi P Shanmugam
Previous Topic:[Zest] using ZoomContributionViewItem in a view
Next Topic:CheckedContainerTreeViewer getCheckedElements fails...
Goto Forum:
  


Current Time: Wed Apr 24 17:46:25 GMT 2024

Powered by FUDForum. Page generated in 0.04420 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top