Archive for the ‘C++’ Category

November 18, 2014 0

Make QT 5 detectable by cmake on windows

By in C++, cmake, qt, Visual Studio 2013, Windows

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)

October 31, 2014 0

Qt creator and perhaps visual studio 2013 is missing include directories and other env variables

By in C++, c++, Visual Studio 2013, Windows

Symptom: 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: ,

April 17, 2013 0

define install targets in qmake pro project files

By 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: , , , ,

April 11, 2013 0

check if library is on ld search path

By in C++, gcc, linux

If 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: , , ,

August 7, 2012 0

linker error when using pkg-config

By in c++, C++, Eclipse, gcc

If 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: , ,

August 5, 2011 0

timing in C++

By in C++

when wanting high precision timing in C++ on linux use time.h and do timespec timestamp; clock_timeofday(CLOCK_REALTIME,&timestamp); It is unknown where CLOCK_REALTIME is defined but the computer didn’t seem to complain. And remember to link agains librt.so    

Tags: