Visual Studio doesn't find GL/glut.h - c++

I'm using Microsoft Visual Studio Community 2017 on Windows 10 and I've been trying to install GLUT using this online guide that I found on this StackOverflow question. However, when I try to compile my code this error still shows up: fatal error C1083: Cannot open include file: 'GL\glut.h': No such file or directory. I've followed every single step line by line, but nothing seems to work. What could be causing this error?
This is how I'm importing the dependencies:
#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>

For this, I like to use the Nuget package manager. If you go to
Tools>NuGet Package Manager>Package Manager Console
Then, in the console type:
Install-Package nupengl.core
Your problem should be fixed.

Related

How to succesfully build a project using the MSBuild?

I have a 3-dr party project that I'd like to build. The author said to build it I have to use the MSBuild. Here is the exact citation from him:
Clone https://github.com/NovaRain/DXSDK_Collection.git to some
Copy \DXSDK_Aug2007\Lib\x86\dinput.lib to \DXSDK_Jun2010\Lib\x86\
Set environment variable DXSDK_DIR to "\DXSDK_Jun2010" (trailing slash is important)
In sfall directory (where ddraw.sln is), create empty PostBuild.cmd
Run VS installer and add "MSVC v140 - VS 2015 C++ build tools (v14.00)" if you don't have it already
Find MSBuild.exe and run: MSBuild.exe path\to\ddraw.sln -p:Configuration=ReleaseXP -p:Platform=Win32 -p:PlatformToolset=v140_xp
I've followed all the steps carefully but when i run the MSBuild command I'm getting followin error: "Cannot open include file: 'algorithm': No such file or directory"
here is the stdafx.h header content for a reference:
#pragma once
#pragma message("Compiling precompiled headers.\n")
#define WINVER _WIN32_WINNT_WINXP
#define _WIN32_WINNT _WIN32_WINNT_WINXP
#include <algorithm>
#include <functional>
#include <initializer_list>
#include <memory>
#include <vector>
#include <unordered_map>
#include <map>
#include <string>
//#define WIN32_LEAN_AND_MEAN
#define NOCRYPT
#define NOSERVICE
#define NOMCX
#define NOIME
#include <Windows.h>
#include <intrin.h>
How could it be that the Standard Library headers isn't available since I've done a standard VS c++ installation?

Errors when including intrin.h?

I'm trying to build my project, which uses things like __cpuid and __cpuidex, so I need intrin.h. When I try to include it and build my project, I get two errors. They are:
`tagMENUBARINFO::fUnused`: type of bit field too small for number of bits
in winuser.h, and in minwindef.h I get the error
`BOOL`: redefinition; different basic types
My includes:
#include <Windows.h>
#include <string>
#include <vector>
#include <sstream>
#include <map>
#include <algorithm>
#include <intrin.h>
I need all of these includes, so removing some isn't really an option.
I'm using Visual Studio 2019 as my compiler, my Windows SDK Version is 10.0, and the C++ language standard is ISO C++14 Standard.

DirectX header files not found (MinGW)

I am using MinGW compiler with the command line and sublime text 3. While including the header files for DirectX into my C++ code, it gave errors saying they weren't found.
#include <windows.h>
#include <windowsx.h>
#include <d3d11.h>
#include <d3dx11.h>
#include <d3dx10.h>
This results in the following error:
lesson 5.cpp:4:20: fatal error: d3dx11.h: No such file or directory
#include <d3dx11.h>
If I comment out the line it gave an error for, it just gives the same error for the next line.

Errors when compiling (Sublime/Visual Studio)

I am using Sublime Text 3 (build 3126) with g++ on Windows 10 x64 to compile my c++. My code so far is:
#include <stdio.h>
#include <windows.h>
#include <wincrypt.h>
#include <string>
using namespace std;
int main() {
return 0;
}
But when I compile, I get the error
wincrypt.h: No such file or directory.
I have also tried using Visual Studio 2015, but when I build it always gives me the error
Cannot open include file: 'stdio.h': No such file or directory
Any help is appreciated, thanks.

Error "Unresolved inclusion" while buidling Blackberry app

Trying to build BlackBerry 10 app . Some of its parts already has been done.I have downloaded ECLIPSE indigo, QT5.31, Blackberry SDK. Now i am trying to open it in Eclipse. But getting error :
Unresolved inclusion on following lines :
<bb/cascades/Application>
#include <Qt/5.3/qdeclarativedebug.h>
#include <bb/cascades/Application>
#include <bb/cascades/QmlDocument>
#include <bb/cascades/LocaleHandler>
#include <bb/cascades/AbstractPane>
#include <bb/cascades/LocaleHandler>
#include <bb/cascades/NavigationPane>
#include <bb/cascades/TabbedPane>
#include <bb/system/InvokeManager>
#include <bb/system/InvokeRequest>
#include <bb/system/InvokeTarget>
#include <bb/system/InvokeTargetReply>
#include <bb/device/DisplayInfo>
Project has following files with
.CPP
.HPP
.QML
.PRO
.UI
extension.
Thanks
.PRO file has following code :
APP_NAME = Gazzet
CONFIG += qt warn_on cascades10
include(config.pri)
LIBS += -lbb -lbbdevice -lbbdata -lbbsystem -lbbplatform -lbbplatformbbm
I dont know if thats the correct soluton but
I downloaded Momentics IDE with Blackberry 10 SDK and those errors where gone.
Thanks