Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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)

share|improve this question

closed as too localized by Sean Middleditch, Byte56, bummzack, Ali.S, API-Beast Mar 16 '13 at 0:13

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

1 Answer 1

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").

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.