title: GLFW setting callback functions
body: <p>What <code>data type</code> to use when setting a callback functions in <code>GLFW</code>?</p>
  
  <p>I try setting a function  to type <code>void</code> but gives me a <code>compile error</code>. Changing it to <code>void __stdcall</code> gives me an <code>RT error</code>, but how do I use the <code>typedef</code>'s of <code>GLFW</code> such as <code>GLFW*fun</code>? I think this is the right one to do. I really need an example source code.</p>
  
  <p>btw, I define GLFW as <strong><code>GLFW_DLL</code></strong></p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>My code's look like this:</p>
  
  <p>(I did it in three ways)</p>
  
  <p><strong>1</strong></p>
  
  <p>prototype. because <code>these*</code> are below <code>main</code>
  this one gives me a compile error(invalid conversion)</p>
  
  <pre><code>void MouseClick(int, int);
  void Keyboard(int, int);
  //...
  </code></pre>
  
  <p><strong>2</strong></p>
  
  <pre><code>//appending `__stdcall` get compiled but gives me `RT error`
  
  void __stdcall MouseClick(int, int);
  void __stdcall Keyboard(int, int);
  </code></pre>
  
  <p><strong>3</strong></p>
  
  <p>on my other project, I use <code>GLFW_BUILD_DLL</code> and compiles in <code>MSVS</code> with casting.
  <code>glfwSetKeyCallback((GLFWkeyfun)Keyboard);</code>
  but now, I can't do it in <code>MinGW</code> with the <code>GLFW_DLL</code></p>
  
  <pre><code>void MouseClick(int x, int y) {
  
  }
  </code></pre>
  
  <p>in <code>main</code>...</p>
  
  <pre><code>int main() {
  
  //glfw intialization...
  
  glfwSetKeyCallback(Keyboard);
  //other setters
  
  }
  </code></pre>
  
  <p>but, how do I do it this way?</p>
  
  <pre><code>GLFWmouseposfun MousePos {
  
  }
  
  //...
  </code></pre>