title: How to get static final variables using JNA
body: <p>I am using the GLEW library glew32.dll (standard download from the GLEW website) and I am trying to load the variable GLEW_OK. This variable is defined in the glew.h file (as a uint of 0), so I am assuming it would be included in the glew32.dll file. However, when I use the Java JNA code :</p>
  
  <pre><code>NativeLibrary glew = NativeLibrary.getInstance("glew.dll");
  Pointer p = glew.getGlobalVariableAddress("GLEW_OK");
  System.out.println(p.getInt(0));
  </code></pre>
  
  <p>I am given an error of Exception in thread "main" java.lang.UnsatisfiedLinkError: Error looking up 'GLEW_OK': The specified procedure could not be found.</p>
  
  <pre><code>at com.sun.jna.NativeLibrary.getGlobalVariableAddress(NativeLibrary.java:587)
  at mcclean.opengl.glew.GLEWUtils.init(GLEWUtils.java:22)
  </code></pre>
  
  <p>The library is loaded fine, but it appears the static variable could not be found. Why is the static variable not being loaded?</p>