Compile lwjgl in Linux...

Started by jiapei100, October 12, 2009, 18:18:57

Previous topic - Next topic

jiapei100



Hi, all:

Whenever I tried to compile lwjgl-svn using Eclipse under Ubuntu 9.04, I obtained the following error messages:

compile:
     [core] Compiling 315 source files to /home/jiapei/MyPrograms/Eclipse/lwjgl/bin
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/MacOSXSysImplementation.java:36: package com.apple.eio does not exist
     [core] import com.apple.eio.FileManager;
     [core]                     ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/opengl/MacOSXDisplay.java:57: package com.apple.eawt does not exist
     [core] import com.apple.eawt.Application;
     [core]                      ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/opengl/MacOSXDisplay.java:58: package com.apple.eawt does not exist
     [core] import com.apple.eawt.ApplicationAdapter;
     [core]                      ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/opengl/MacOSXDisplay.java:59: package com.apple.eawt does not exist
     [core] import com.apple.eawt.ApplicationEvent;
     [core]                      ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/MacOSXSysImplementation.java:58: cannot find symbol
     [core] symbol  : variable FileManager
     [core] location: class org.lwjgl.MacOSXSysImplementation
     [core] 			FileManager.openURL(url);
     [core] 			^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/WindowsSysImplementation.java:80: warning: non-varargs call of varargs method with inexact argument type for last parameter;
     [core] cast to java.lang.Class<?> for a varargs call
     [core] cast to java.lang.Class<?>[] for a non-varargs call and to suppress this warning
     [core] 					Method getImplementation_method = Display.class.getDeclaredMethod("getImplementation", null);
     [core] 					                                                                                       ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/WindowsSysImplementation.java:82: warning: non-varargs call of varargs method with inexact argument type for last parameter;
     [core] cast to java.lang.Object for a varargs call
     [core] cast to java.lang.Object[] for a non-varargs call and to suppress this warning
     [core] 					Object display_impl = getImplementation_method.invoke(null, null);
     [core] 					                                                            ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/WindowsSysImplementation.java:84: warning: non-varargs call of varargs method with inexact argument type for last parameter;
     [core] cast to java.lang.Class for a varargs call
     [core] cast to java.lang.Class[] for a non-varargs call and to suppress this warning
     [core] 					Method getHwnd_method = WindowsDisplay_class.getDeclaredMethod("getHwnd", null);
     [core] 					                                                                          ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/WindowsSysImplementation.java:86: warning: non-varargs call of varargs method with inexact argument type for last parameter;
     [core] cast to java.lang.Object for a varargs call
     [core] cast to java.lang.Object[] for a non-varargs call and to suppress this warning
     [core] 					Long hwnd = (Long)getHwnd_method.invoke(display_impl, null);
     [core] 					                                                      ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/input/OpenGLPackageAccess.java:71: warning: non-varargs call of varargs method with inexact argument type for last parameter;
     [core] cast to java.lang.Class<?> for a varargs call
     [core] cast to java.lang.Class<?>[] for a non-varargs call and to suppress this warning
     [core] 					Method getImplementation_method = Display.class.getDeclaredMethod("getImplementation", null);
     [core] 					                                                                                       ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/input/OpenGLPackageAccess.java:73: warning: non-varargs call of varargs method with inexact argument type for last parameter;
     [core] cast to java.lang.Object for a varargs call
     [core] cast to java.lang.Object[] for a non-varargs call and to suppress this warning
     [core] 					return getImplementation_method.invoke(null, null);
     [core] 					                                             ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/opengl/GLContext.java:256: warning: non-varargs call of varargs method with inexact argument type for last parameter;
     [core] cast to java.lang.Class for a varargs call
     [core] cast to java.lang.Class[] for a non-varargs call and to suppress this warning
     [core] 						Method init_stubs_method = extension_class.getDeclaredMethod("initNativeStubs", null);
     [core] 						                                                                                ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/opengl/GLContext.java:257: warning: non-varargs call of varargs method with inexact argument type for last parameter;
     [core] cast to java.lang.Object for a varargs call
     [core] cast to java.lang.Object[] for a non-varargs call and to suppress this warning
     [core] 						init_stubs_method.invoke(null, null);
     [core] 						                               ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/opengl/LinuxCanvasImplementation.java:55: warning: non-varargs call of varargs method with inexact argument type for last parameter;
     [core] cast to java.lang.Class<?> for a varargs call
     [core] cast to java.lang.Class<?>[] for a non-varargs call and to suppress this warning
     [core] 					return device.getClass().getMethod("getScreen", null);
     [core] 					                                                ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/opengl/LinuxCanvasImplementation.java:58: warning: non-varargs call of varargs method with inexact argument type for last parameter;
     [core] cast to java.lang.Object for a varargs call
     [core] cast to java.lang.Object[] for a non-varargs call and to suppress this warning
     [core] 			Integer screen = (Integer)getScreen_method.invoke(device, null);
     [core] 			                                                          ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/opengl/LinuxCanvasImplementation.java:69: warning: non-varargs call of varargs method with inexact argument type for last parameter;
     [core] cast to java.lang.Class<?> for a varargs call
     [core] cast to java.lang.Class<?>[] for a non-varargs call and to suppress this warning
     [core] 					return configuration.getClass().getMethod("getVisual", null);
     [core] 					                                                       ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/opengl/LinuxCanvasImplementation.java:72: warning: non-varargs call of varargs method with inexact argument type for last parameter;
     [core] cast to java.lang.Object for a varargs call
     [core] cast to java.lang.Object[] for a non-varargs call and to suppress this warning
     [core] 			Integer visual = (Integer)getVisual_method.invoke(configuration, null);
     [core] 			                                                                 ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/opengl/MacOSXDisplay.java:80: cannot find symbol
     [core] symbol: class ApplicationAdapter
     [core] 					Application.getApplication().addApplicationListener(new ApplicationAdapter() {
     [core] 					                                                        ^
     [core] /home/jiapei/MyPrograms/Eclipse/lwjgl/src/java/org/lwjgl/opengl/MacOSXDisplay.java:80: cannot find symbol
     [core] symbol: variable Application
     [core] 					Application.getApplication().addApplicationListener(new ApplicationAdapter() {
     [core] 					^
     [core] Note: Some input files use unchecked or unsafe operations.
     [core] Note: Recompile with -Xlint:unchecked for details.
     [core] 7 errors
     [core] 12 warnings

BUILD FAILED
/home/jiapei/MyPrograms/Eclipse/lwjgl/build.xml:236: Compile failed; see the compiler error output for details.

Total time: 21 seconds



I really don't know why building lwjgl under Linux requiring those staffs from Mac, and I did add "AppleJavaExtensions.jar" into my class path even if lwjgl requires so. But I'm wondering if lwjgl still tries to look for Mac native codes (surely, I'm using Ubuntu, I don't have Mac native codes/libraries. )

So, can anybody give me a hand on how to successfully compile lwjgl under Linux? How to remove those requirement by Mac if I'm under Linux?

Cheers
JIA
Welcome to Longer Vision

jiapei100



I did it. After a fresh SVN download.

Cheers
JIA
Welcome to Longer Vision