[Kst] Compiling latest sources on Windows MSVC
david.mcminn at intelligentwellcontrols.com
Tue May 8 16:49:55 UTC 2012
First up, apologies for the long rambling email :)
I'm interested in contributing to KST (or at least seeing whether it would
be feasible for me to do so) so I checked out the latest repository sources.
I have the QtSDK 1.2 installed, CMake 2.8.8 and MSVC2008 Express. Following
the instructions on the KST website I open the cmake/CMakeLists.txt file
within QtCreator. I select the nmake MSVC 2008 x86 option and run CMake. It
finds Qt4, creates the necessary files and completes without error.
However, when I try to build Kst I get an error from the compiler:
C:\David\Dev\KST\source\src\libkst\builtindatasources.cpp : fatal error
C1083: Cannot open precompiled header file:
such file or directory
I've never used CMake before so if I'm making a mistake somewhere please let
me know. When I track through the makefiles it looks as if I get to a point
in src/libkst/CMakeFiles/kst2core.dir/build.make where it performs the real
compilation of builtindatasources.cpp. I can see the command line includes
the /Yu and /Fp compiler flags for the precompiled header. What I don't see
is a dependency on
"src\libkst\CMakeFiles\kst2core.dir\kstcore_pch.h.cpp.obj" which seems to be
the target used to build the precompiled header file, and there isn't one in
the src/libkst/CMakeFiles/kst2core.dir/depend.make file either.
The other thing is that I am sure MSVC complains if the first thing it finds
in the source files is not the #include "precompiled header filename.h".
Since none of the Kst source files have that is it even worth me continuing
trying to get MSVC to compile this with precompiled headers or should I just
turn them off?
If I should turn them off, what's the best way? I tried modifying the top
level CMakeLists.txt to set
kst_option(pch "Use precompiled headers" OFF all)
but the kst_pch option was always reported as being ON and the build.make
file I found earlier still had the /Yu and /Fp commands for precompiled
More information about the Kst