3
\$\begingroup\$

I'm trying to set up GLEW with Visual Studio 2012 and I'm having some trouble with it.

I downloaded the GLEW binary from http://glew.sourceforge.net/ and moved the contents from it's lib folder to C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib folder, and the contents from the include\GL folder to C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include\GL folder.

Then I started up Visual Studio, and linked the glew32.lib in the linker properties section.

When I try to compile, I get the error: error LNK1104: cannot open file 'glew32.lib'.

How can I get this to work, preferably without copying the libs to system32? (I'll do that if I really can't get this to work)

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

After downloading the binary you can extract the whole folder anywhere. For this example lets say C:\glew-1.9.0\.

After doing so you can go in VS2012, right click on your project, go to Configuration Properties, VC++ Directories, select Include Directories, from the dropdown list select <Edit...>, click on New Line (Ctrl+Insert) and paste in C:\glew-1.9.0\include, then press OK and repeat same steps by selecting Library Directories and add C:\glew-1.9.0\lib.

After that you can simply use #pragma comment(lib, "glew32").

\$\endgroup\$
0

Not the answer you're looking for? Browse other questions tagged .