Now, the issue is with using Qt and the GPIOlib from Toradex.
When I include the gpio.h file in my main.cpp, the project compiles and I can use the GPIO API in main.cpp
But when I include it in the Qt main file (eg.gpiomain.cpp, the class implementing QMainWindow), I get compilation errors.
This is the BuildLog.htm for reference
My question is simple: How can we include the Toradex libs into Qt when using VS2008 as IDE?
In addition to the instructions I had to do the following modifications in order to build the example:
After opening the project in VS2008, I needed to change the SDK name from SDK2wince7 (ARMv4I) to Toradex_CE700 (ARMv4I):
VS2008 Menu →Build→Configuration Manager →Active solution platform →<New…>
new Platform = “Toradex_CE700”, copy settings from “SDK2wince7”
I built the example and verified that it was working properly on my target device.
Adding the Toradex Ce Libraries
After the basic example was running, I did the following steps to add the Toradex CE libraries to the project
I downloaded the latest version of the libraries and unzipped the libraries to the folder _C:\Qt\4.8.4\examples\opengl\TdxLibs\ _
In VS2008 I added the path to the header files and the binary libraries to the project settings:
Project →hellogl_es2 project Properties →Configuration Properties →C/C++ →General →Additional Include Directories
add …\TdxLibs\inc; to the existing directories. Make sure you do this for both the Release and Debug configuration.
Project →hellogl_es2 project Properties →Configuration Properties →Linker →General →Additional Library Directories
add “…\TdxLibs\libs\lib\Toradex_CE600 (ARMv4I)Debug”; to the existing directories for the debug configuration,
add “…\TdxLibs\libs\lib\Toradex_CE600 (ARMv4I)Release”; to the existing directories for the release configuration.
Adding code to use the libraries
I modified the hellogl_es2 example to indicate on a GPIO (SODIMM135) whether bubbles are shown or not:
I added the GPIO header file to the project c:\Qt\4.8.4\examples\opengl\TdxLibs\inc\gpio.h
This step is not required, but helps to navigate through the source code
In the file glwidget.cpp I included the header file: #include "gpio.h"
I modified the function GLWidget::showBubbles() as follows: