↑Qt 5.5.0 problem running examples SOLVED. Archived from the original on 2016-08-01. Retrieved 2016-08-01. Execute the following command to install OpenGL libraries: sudo apt-get install mesa-common-dev Note: Just installing the above-mentioned mesa-common-dev kit is not sufficient for more recent Ubuntu versions. Qt5GuiConfig.cmake qt5gui-config.cmake' I know the correct path to this things, but I do not know how to tell it Cmake. Also with google I found no solution. This is the normal command I use: cmake -D WITHTBB=ON -D BUILDNEWPYTHONSUPPORT=ON -D WITHV4L=ON -D INSTALLCEXAMPLES=ON -D BUILDEXAMPLES=ON -D WITHQT=ON -D WITHOPENGL=ON.
SDL2 is the newest version of the Simple Directmedia Layer API. It can be usedtogether with CMake to build a cross platform multimedia application. In thisblog post I will describe the necessary steps to use SDL2 with CMake on bothLinux (Ubuntu 17.04) and Windows.
You need to create a
CMakeLists.txt file for your project that includes
SDL2and compiles a simple program.
You can use the following code:
Setting up SDL2 with CMake under Ubuntu Linux is pretty easy. All you need to dois install the required dependencies first.
Now you can use
cmake to generate your Makefiles and build your project. Toinclude SDL2 headers you just use
#include 'SDL.h'. The correct include pathshave been set up by cmake. For Linux nothing else is required.
For Windows you have to download the development package
SDL2-devel-2.0.5-VC.zip and extract it to some location on your hard disk.
You can create Visual Studio project files with the CMake GUI under windows butwhen you hit configure it will fail because it will not find the SDL2 Library.
In the configuration window you will see a
SDL2_DIR variable. You will have topoint that to the location where you extracted the SDL2 development package.
Before you can reconfigure you also have to create a file
sdl2-config.cmakewhere you extracted the development libraries and put the following content:
After that you now should be able to reconfigure successfully and generate theVisual Studio project files.
An alternative to the config file is a
FindSDL2.cmake module.CMake comes with one that works for SDL1.2, it can be adapted to work with SDL2.Here is the full content for the one that I am using:
In order to use it you have to place it somewhere in your project for instance into a
cmake subdirectory.Then you have to modify the CMake module path so that it can be found.
You can create a test application to verify that everything works. You could forinstance use the following code for that which renders a black window.
If you also want to use SDL2_image check out my other post Using SDL2_image with CMake.
There is also a complete project in my github repository here.
when i creating a new workspace(in windouws) using
this error happend.
i dont know why,and dont konw how to fix it.Does someone konw how to fix it? Iwould be appreciated!
I have the same issue. Did you install from binaries? Which ROS2 version and patch release are you using?
By the way, I think this is a duplicate to this question.
yes,i install from binaries,foxy.And,the patch release maybe patch release 4? I forget it.
@Ataraxy I just fixed the issue. Check this question for my solution. Image grid instagram template.
Thx man !! i fixed it.its useful,thx a lot!!