0

I want to build a static version of qt 5.1.1 using microsoft visual studio. I executed configure -static -release -platform win32-msvc and then I executed nmake but these errors occured:

c:\qt\qtbase\include\qtgui\../../src/gui/opengl/qopengl.h(82) : fatal error C108
3: Cannot open include file: 'GLES2/gl2.h': No such file or directory
qopenglcontext.cpp
c:\qt\qtbase\include\qtgui\../../src/gui/opengl/qopengl.h(82) : fatal error C108
3: Cannot open include file: 'GLES2/gl2.h': No such file or directory
Generating Code...
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

and at the end there is no qmake.exe file in directory. what is the problem?

Aidin.T
  • 731
  • 3
  • 10
  • 25

2 Answers2

3

On Windows, you must do one of two things:

  1. Provide the include and library path to the system OpenGL implementation. This only makes sense if you intend to target Windows XP, as ANGLE doesn't work there for some reason.

  2. Use the bundled ANGLE implementation of OpenGL that runs on top of DirectX. Add the -angle argument to the configure command line. You must install the DirectX SDK prior to building Qt with ANGLE.

I suggest providing explicit visual studio version within the platform. For example, for VS2010, use -platform win32-msvc2010. In any case your choices for Qt 5 are only 2008, 2010 or 2012, 2013, 2015.

You might also benefit from using jom instead of nmake. It will try to keep all of your cores occupied, it will certainly build Qt much faster on a multicore machine. Jom is a drop-in replacement, there's no need to change anything. It's a parallel reimplementation of nmake.

Community
  • 1
  • 1
Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313
2

You compiling OpenGL ES version of Qt. To use in desktop you should pass to configure "-opengl desktop" parameter.

Dcow
  • 1,413
  • 1
  • 19
  • 42
  • this error occurs when I execute configure: WARNING: ANGLE specified, but the DirectX SDK could not be detected: There is no Direct X SDK installed or the environment variable "DXSDK_DIR" is not set. The build will most likely fail. – Aidin.T Oct 03 '13 at 14:41