簡體   English   中英

Visual Studio 找不到 GL/glut.h

[英]Visual Studio doesn't find GL/glut.h

我在 Windows 10 上使用 Microsoft Visual Studio Community 2017,我一直在嘗試使用我在這個 StackOverflow 問題上找到的在線指南來安裝 GLUT。 然而,當我嘗試編譯我的代碼時,這個錯誤仍然出現: fatal error C1083: Cannot open include file: 'GL\glut.h': No such file or directory 我逐行執行了每一步,但似乎沒有任何效果。 什么可能導致此錯誤?

這就是我導入依賴項的方式:

#include <iostream>
#include <Windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <GL/GL.h>
#include <GL/GLU.h>
#include <GL/glut.h>
#include <cstring>
#include "math.h"
#include <conio.h>

為此,我喜歡使用 Nuget 包管理器。 如果你去

Tools>NuGet Package Manager>Package Manager Console

然后,在控制台類型中:

Install-Package nupengl.core

您的問題應該已解決。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM