nTrackMouseEvent exception

Hi,

I got a working project on a PC under Windows Vista with an older version of lwjgl (2.0.X I think). I move to another PC with a fresh install with Windows Under and the lastest version of lwjgl (2.2.2). When I put the mouse over the display, I get :


Exception in thread "main" java.lang.UnsatisfiedLinkError: org.lwjgl.opengl.WindowsDisplay.nTrackMouseEvent(J)Z
        at org.lwjgl.opengl.WindowsDisplay.nTrackMouseEvent(Native Method)
        at org.lwjgl.opengl.WindowsDisplay.doHandleMessage(WindowsDisplay.java:822)
        at org.lwjgl.opengl.WindowsDisplay.handleMessage(WindowsDisplay.java:756)
        at org.lwjgl.opengl.WindowsDisplay.nUpdate(Native Method)
        at org.lwjgl.opengl.WindowsDisplay.update(WindowsDisplay.java:410)
        at org.lwjgl.opengl.Display.processMessages(Display.java:628)
        at org.lwjgl.opengl.Display.update(Display.java:660)
        at net.bonbonchan.pairs.MainTools.run(MainTools.java:1043)
        at java.lang.Thread.run(Thread.java:619)
        at net.bonbonchan.pairs.MainTools.<init>(MainTools.java:92)
        at net.bonbonchan.pairs.MainTools.main(MainTools.java:639)

I think that I saw something like that in this forum but I didn’t find it.

My init code don’t have anything special :

private void initlwjgl(String title)
  {
    try
     {
       canvasLWJGL.setIgnoreRepaint(true);

       Display.setTitle(title);
       Display.setFullscreen(false);
       Display.setVSyncEnabled(true);
       Display.setParent(canvasLWJGL);

       PixelFormat pf = new PixelFormat(2, 0, 1, 1);

       try
       {
          Display.create(pf);
       }
       catch(LWJGLException e)
       {
         System.err.println("No antialiasing");
         pf = new PixelFormat(2, 0, 1, 0);
         Display.create(pf);
       }
     }
    catch (LWJGLException e)
     {
       System.err.println("Cant' create Display : "+e.toString());
       System.exit(0);
     }

    try
     {
       Keyboard.create();
       Mouse.create();
     }
   catch (LWJGLException ex)
     {
       ex.printStackTrace();
     }
  }

Why ??? :’( :’( :’( :’( :’( :wink:

this may seem basic but have you double checked that you are using the correct natives files?

that error can be triggered if you have a different version lwjg.jar from the lwjgl native files your using.

It is a trap !!!
The native move from /win32/ to /windows/. I didn’t see that when updating ::slight_smile:

Thanks.

For every person that reports these issues, there are a lot struggling…

Maybe the version number should be hardcoded in both the Java code and the native libraries. Then the Java code can verify it is working with the same version (as in: nVerifyCurrentVersion(theJavaVersion) or the other way around).

that is done usually, guess someone just forgot to bump the version number on the natives after making changes to them.