It seems that for cmake to be able to find the needed qt .cmake files it’s sufficient to add the qt bin folder to the path env variable (e.g. C:\Qt\5.3\msvc2013_64_opengl\bin)
Archive for the ‘C++’ Category
Make QT 5 detectable by cmake on windows
By thomas in C++, cmake, qt, Visual Studio 2013, WindowsQt creator and perhaps visual studio 2013 is missing include directories and other env variables
By thomas in C++, c++, Visual Studio 2013, WindowsSymptom: Cant compile any programs and compiler complaining about missing standard header files such as stddef.h diagnose: in QT creator go to project settings and inspect environment variables. There should be e.g an INCLUDE variable. If not the vcvarsall.bat file that is accompanying VS is not run propable. Following this post: http://schrievkrom.wordpress.com/2011/01/25/error-cannot-determine-the-location-of-the-vs-common-tools-folder/ it seems that the […]
Tags: qt creator, stddef.h
define install targets in qmake pro project files
By thomas in C++, c++There isn’t much documentation about how to define install targets in a .pro file for qmake. This link does however clearify some aspects of the possibilities: http://doc.qt.digia.com/4.3/qmake-environment-reference.html#installs
Tags: install target, pro, qmake, qt, qt creator
check if library is on ld search path
By thomas in C++, gcc, linuxIf you have linker problems you might want to ensure that you actually have the librariess that you are linking into your program on your ld search path. This can be investigated using ldconfig and grep ldconfig -v prints out the paths on the ld search path and what libraries is on the path. It […]
Tags: case insensitive, grep, ldconfig, shared library
linker error when using pkg-config
By thomas in c++, C++, Eclipse, gccIf you are not able to link with a library that is specified via pkg-config then make sure your pkg-config flag is placed in the end of the compiler/linker command eg: g++ -o “OpenCV2.3Test” ./main.o `pkg-config –libs opencv` instead of g++ `pkg-config –libs opencv` -o “OpenCV2.3Test” ./main.o In Eclipse this is done by going to project […]
Tags: eclipse, pkg-config, pkgconfig
timing in C++
By thomas in C++when wanting high precision timing in C++ on linux use time.h and do timespec timestamp; clock_timeofday(CLOCK_REALTIME,×tamp); It is unknown where CLOCK_REALTIME is defined but the computer didn’t seem to complain. And remember to link agains librt.so
Tags: c++ timing linux ubuntu