(Original) Compile GLUT under win8

  • Go to opengl official website to download glut source code
  • Modify under glutwin32.mak
# MSVC install directories
LIBINSTALL     = XXXXX\VC\lib //vs安装目录下 例如G:\application\VS2013\VC\lib
INCLUDEINSTALL = xxxxxx\VC\include\GL //同上 没有GL目录的 自己新建
# WinNT dll directory DLLINSTALL     = C:\Windows\system32
  • Modify glut-3.7\lib\glut\Makefile.win
将!include <win32.mak>修改为!include <C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1A/Include/win32.mak>
$(link) $(LFLAGS) -out:$(GLUTDLL) -def:glut.def  $(OBJS) $(LIBS)修改为
$(link) $(LFLAGS) -out:$(GLUTDLL) -def:glut.def  $(OBJS) $(LIBS) -NODEFAULTLIB:$(GLUTLIB)
  • Find the command line tool for x86 under vs

cd to the glut directory and execute glutmake.bat

After executing this, the generated dll lib header file will be automatically copied to the corresponding directory, and the command line will report that win32.mak cannot be found. This can be ignored.

Remarks: At present, 64-bit glut does not seem to work under windows. I have tried to use the 64-bit command line under vs to compile an error.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325525535&siteId=291194637
Recommended