Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I got the glew binaries from <a href="http://glew.sourceforge.net/index.html" rel="nofollow noreferrer">http://glew.sourceforge.net/index.html</a> (<a href="https://sourceforge.net/projects/glew/files/glew/1.9.0/glew-1.9.0-win32.zip/download" rel="nofollow noreferrer">https://sourceforge.net/projects/glew/files/glew/1.9.0/glew-1.9.0-win32.zip/download</a>) and freeglut 2.8.0 MSVC Package from <a href="http://www.transmissionzero.co.uk/software/freeglut-devel/" rel="nofollow noreferrer">http://www.transmissionzero.co.uk/software/freeglut-devel/</a> (<a href="http://files.transmissionzero.co.uk/software/development/GLUT/freeglut-MSVC.zip" rel="nofollow noreferrer">http://files.transmissionzero.co.uk/software/development/GLUT/freeglut-MSVC.zip</a>)</p> <p>I set the include path to <code>glew-1.9.0\include\</code>, <code>freeglut\include\</code> and library path to <code>freeglut\lib\</code>, <code>glew-1.9.0\lib\</code>. </p> <p>I corrected the header of your file as</p> <pre><code>#include &lt;Windows.h&gt; #include &lt;iostream&gt; #include &lt;gl/glew.h&gt; #include &lt;gl/GL.h&gt; #include &lt;gl/freeglut.h&gt; #pragma comment(lib, "glew32.lib") </code></pre> <p>Linking successful, and it worked.</p> <p><strong>UPD</strong></p> <p>When using third-party libraries, usually:</p> <ul> <li>You must set the include path to <code>&lt;3rdPartyDir&gt;\include</code>, but not to <code>&lt;3rdPartyDir&gt;\include\lib_name</code>. Declare its inclusion in the source code should be: </li> </ul> <p>correct: <code>#include &lt;lib_name/header_name.h&gt;</code></p> <p>wrong: <code>#include &lt;header_name.h&gt;</code>, because within the library can be internal dependencies, for example <code>#include &lt;lib_name/other_header_name.h&gt;</code></p> <ul> <li>Set the library path to <code>&lt;3rdPartyDir&gt;\lib</code>. Then, you must specify the required libraries, one of the following methods:</li> </ul> <p>For MSVC, add</p> <pre><code>#ifdef _MSC_VER #pragma comment(lib, "lib1_name.lib") #pragma comment(lib, "lib2_name.lib") /// etc #endif </code></pre> <p>Or, add the required libraries to the linker options. </p> <p>Some libraries support auto-linking mechanism (for example, freeglut), that is, the header file contains a line like <code>#pragma comment(lib, "lib1_name.lib")</code></p> <ul> <li>Copy the required dlls from <code>&lt;3rdPartyDir&gt;\bin</code> to <code>&lt;MyExePath&gt;\</code></li> </ul>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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