error: GL/gl.h: No such file or directory

When compling the Qt based program on Ubuntu, following error is shown

/home/gbstack/app/Qt/5.15.2/gcc_64/include/QtGui/qopengl.h:141: error: GL/gl.h: No such file or directory
In file included from ../../../app/Qt/5.15.2/gcc_64/include/QtGui/qopengltexture.h:47,
from ../../../app/Qt/5.15.2/gcc_64/include/QtGui/QOpenGLTexture:1,
from ../../QtScrcpy/QtScrcpy/device/render/qyuvopenglwidget.cpp:2:
../../../app/Qt/5.15.2/gcc_64/include/QtGui/qopengl.h:141:13: fatal error: GL/gl.h: No such file or directory
141 | # include <GL/gl.h>
| ^~~~~

I tried apt install libopengl-dev but it doesn't work.

Solution

apt install libgl-dev

Shiboken Multiple Include Path on Windows

In shiboken documentation, it's saying the separator of include path should be : (colon)

But on Windows every full path is containing colon (e.g. C:\Windows\cmd), it will mess with the colon separator.

In its source code printUsage() function I found it's actually using a PATH_SPLITTER macro to represent the separator. And under windows it's semicolon..

 

At past I'm using colon as separator:

--include-paths=D:\Qt\4.8.7\include\:D:\Qt\4.8.7\include\QtCore\:D:\Python27\Lib\site-packages\PySide\include\PySide

And I got lots of error messages like following:

type is specified in typesystem, but not defined

After replacing colon with semicolon, these errors are gone.

MinGW unable to find pkg-config

Recently I need build libewf on Windows, and MinGW is chosen as the compilation tool.

Open MSYS and run autogen.sh in libewf source directory, then following error is appeared

unable to find: pkg-config

 

I read source code of autogen.sh and realized that it's trying to locate pkg-config at /mingw/bin directory,  Then I checked MinGW installation directory and bin folder, found there is no such pkg-config file. So we need install pkg-config manually.

 

Install pkg-config

At MinGW Wiki page it introduces two methods to install pkg-config, but using a pre-compiled version is much easier. Here is pre-compiled pkg-config download address from SourceForge. After downloading is completed, extract pkg-config.exe and move it to MinGW/bin directory, retry running autogen.sh we will found this problem is solved

Cannot Open File ‘MSCOREE.lib’

When I’m trying to compile the C++/CLI project in Visual Studio 2013, I got an error saying

cannot open file ‘MSCOREE.lib’

This post said MSCOREE.lib is removed from Visual studio 2008, but I’m not sure it’s also working for Visual Studio 2013.

After searching a while, I found this file is located at C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib. Adding this path to Additional Library Directories property value will solve this problem.

Open Project Properties, Linker, General Page and select Additional Library Directories configuration property

Open Project Properties, Linker, General Page and select Additional Library Directories configuration property