Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Just to make sure we're talking about the same issues, here's the message I used to get.</p> <blockquote> <p>$ g++ -o glew_test.exe glew_test.cpp -lglut32 -lglew32<br> c:\Users\Fredrik\Users\Fredrik\AppAppData\Local\Temp/ccgSNdfr.o:<br> glew_test.cpp:(.text+0x1c): undefined reference to &#96;__glutInitWithExit'<br> c:\Users\Fredrik\AppData\Local\Temp/ccgSNdfr.o:<br> glew_test.cpp:(.text+0x37): undefined reference to &#96;__glutCreateWindowWithExit'<br> c:\Users\Fredrik\AppData\Local\Temp/ccgSNdfr.o:<br> glew_test.cpp:(.text+0x53): undefined reference to &#96;__glutCreateMenuWithExit'<br> c:\Users\Fredrik\AppData\Local\Temp/ccgSNdfr.o:<br> glew_test.cpp:(.text+0x9e): undefined reference to &#96;glutInitDisplayMode'<br> c:\Users\Fredrik\AppData\Local\Temp/ccgSNdfr.o:<br> glew_test.cpp:(.text+0xb2): undefined reference to &#96;glutInitWindowPosition'<br> c:\Users\Fredrik\AppData\Local\Temp/ccgSNdfr.o:<br> glew_test.cpp:(.text+0xc6): undefined reference to &#96;glutInitWindowSize'<br> collect2: ld returned 1 exit status<br></p> </blockquote> <p>The following pages helped me with this issue. <ul> <li><a href="http://www.mingw.org/node/28" rel="nofollow noreferrer">www.mingw.org/node/28</a></li> <li>glew.sourceforge.net/install.html</li> </ul></p> <p>Basically I had to define _STDCALL_SUPPORTED and _M_IX86 at the beginning of the file and include windows.h before glew.h</p> <p>Then i used the flags -lglut32 -lglew32</p> <p>If you want to try it out, here's the source as well:</p> <pre><code>#define _STDCALL_SUPPORTED #define _M_IX86 #include &lt;windows.h&gt; #include &lt;GL/glew.h&gt; #include &lt;GL/glut.h&gt; #include &lt;cstdio&gt; int main(int argc, char **argv) { glutInit(&amp;argc, argv); glutCreateWindow("MM 2004-05"); glewInit(); if (glewIsSupported("GL_VERSION_2_0")) printf("Ready for OpenGL 2.0\n"); else { printf("OpenGL 2.0 not supported\n"); } return 0; } </code></pre> <p>Note that the window, for some reason, is needed for the OpenGL2.0 test.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload