简体   繁体   中英

Why am I getting error LNK1104: cannot open file 'glew32.lib'

I've already read many answers that wanted to solve this issue but none of them work. I don't think I'm missing anything:

  • Visual Studio 2013 Community Edition
  • Target = all configurations, all platforms (active = debug, Win32)
  • C/C++ > General > Additional Include Directories: H:\\#DEV\\OpenGL\\glew-1.12.0\\include
  • Linker > General > Additional Library Directories: H:\\#DEV\\OpenGL\\glew-1.12.0\\lib
  • Linker > Input > Additional Dependencies: glew32s.lib (I also tried glew32.lib )
  • Path of both files library files (glew32.lib and glew32s.lib): H:\\#DEV\\OpenGL\\glew-1.12.0\\lib\\Release\\Win32 .

I have permission to access the file, I didn't specify a dll since I want to use only the static version. I also tried:

#define GLEW_STATIC

before #include and #pragma comment(linker, "/NODEFAULTLIB:libc.lib") to no avail.

Visual Studio doesn't look into the subfolders of the directories you specified in
Additional Library Directories .

That means that you have to add the exact path where the library is stored
(which would be in your case H:\\#DEV\\OpenGL\\glew-1.12.0\\lib\\Release\\Win32 ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM