It did require a few changes, in particular the fact that I could not get OpenGL support to compile as it indicated missing header items. So, I put -no-opengl and -nomake tests in the configure step.
I’ve got the SDK to compile and I am able to link Qt apps against the Toradex v2.3 WEC2013 SDK. I can run the EXE’s in the SDK bin folder on the iMX7D so it compiled to the correct ARM format. But at runtime with my own app, or any Qt example, I get the following error:
This application failed to start because it could not find or load the Qt platform plugin “xcb”
in “”.
Reinstalling the application may fix this problem.
Exception thrown at 0x42227E81 (Qt5Core.dll) in TestApp.exe: 0xC0000005: Access violation reading location 0x00000000.
This is confusing because “xcb” is typically only required on Linux systems. It is not a Windows plugin. What did I do wrong? Did I mistakenly compile Wayland? Must I use a specific graphics model for WEC2013 on the iMX7D-512?
Questions:
Is OpenGL supported on the iMX7D-512 for WEC2013?
What graphics model can I use on the iMX7D-512 for Qt 5.6.3?
The OpenGL compilation keeps choking on the following typedef’s:
#ifndef _gl3_h
/* These types are defined with reference to <inttypes.h>
in the Apple extension spec, but here we use the Khronos
portable types in khrplatform.h, and assume those types
are always defined.
If any other extensions using these types are defined,
the typedefs must move out of this block and be shared.
*/
typedef khronos_int64_t GLint64;
typedef khronos_uint64_t GLuint64;
typedef struct __GLsync *GLsync; #endif
With the following errors:
c:\qt5.6\qt-everywhere-opensource-src-5.6.3\qtbase\include\qtgui../…/src/gui/opengl/qopengles2ext.h(23) : error C2146: syntax error : missing ‘;’ before identifier ‘GLint64’
c:\qt5.6\qt-everywhere-opensource-src-5.6.3\qtbase\include\qtgui../…/src/gui/opengl/qopengles2ext.h(23) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\qt5.6\qt-everywhere-opensource-src-5.6.3\qtbase\include\qtgui../…/src/gui/opengl/qopengles2ext.h(24) : error C2146: syntax error : missing ‘;’ before identifier ‘GLuint64’
c:\qt5.6\qt-everywhere-opensource-src-5.6.3\qtbase\include\qtgui../…/src/gui/opengl/qopengles2ext.h(24) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Any hints on how to get beyond this? My guess is that khronos_int64_t and khronos_uint64_t are undefined types in the Toradex WEC2013 SDK?
Ok, it seems I got past this by doing the following in qopengles2ext.h:
#ifndef _gl3_h
/* These types are defined with reference to <inttypes.h>
in the Apple extension spec, but here we use the Khronos
portable types in khrplatform.h, and assume those types
are always defined.
If any other extensions using these types are defined,
the typedefs must move out of this block and be shared.
*/ #include <khronos_types.h>
typedef khronos_int64_t GLint64;
typedef khronos_uint64_t GLuint64;
typedef struct __GLsync *GLsync; #endif
Then, changing the Toradex SDK file Toradex_CE800\Sdk\Inc\khronos_types.h to:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED “AS IS”, WITH NO WARRANTIES OR INDEMNITIES.
// #ifndef _KHRONOS_TYPES_H #define _KHRONOS_TYPES_H
typedef float khronos_float;
typedef signed char khronos_int8_t;
typedef unsigned char khronos_uint8_t;
typedef short khronos_int16_t;
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
typedef unsigned long khronos_uint64_t;
typedef long khronos_int64_t;
The build completed. I copied everything to \FlashDisk\System. However, I now have the problem where trying to load any Qt app that uses any of the Qt DLLs throws up the error:
Note that this is not the path error that displays if the DLL is “not found”. It won’t “import” it.
This seems to be related to the -MT vs. -MD option during compilation in Visual Studio. I used -MT and did not have that issue, but -MD won’t work. Any hints as to why?
I don’t plan to release an upgrade to our instrument using WEC7 as it is out of support and I prefer working in at least VS2015. WEC2013 is supported for two more years with distribution end date in 2028. My character display and firmware is otherwise running fine on the WEC2013 on the iMX7. This is an upgrade from CE5.
I’d like Qt 5.6.3 compiled and running on the Toradex WEC2013 SDK. It should not be that difficult.
As far OpenGL, I suppose QML requires it (?), but I can likely use basic QtWidgets as I only need basic interface items (labels and small images) and no animations. Our market is physicists and they just find fancy animations annoying. This is an instrument that will see intensive interface use for short periods followed by an uptime of weeks.
I should also add the graphic interface update will support only a small 480x272 display and will use a hybrid touch/membrane keypad combination for navigation and data entry.
Ok, I rebuilt using -MT and that made no difference. I still get the import error trying to load any Qt app. I don’t know if it is a Qt paths thing or not – very frustrating. Everything compiles without error but nothing will run.
Maybe I will try compiling static Qt libs just to see if it works since I’ve been through the Qt source compile about a half dozen times now…