[Kst] Compiling latest sources on Windows MSVC

David McMinn david.mcminn at intelligentwellcontrols.com
Wed May 9 11:44:30 UTC 2012


Hi Peter,

>> 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.

[Snip discussion about precompiled headers]

>> If I should turn them off, what's the best way? I tried modifying 
>> the top

> from QtCreator/Project you could rerun cmake and there you could pass
> the argument
> 
> -Dkst_pch=OFF
> 
> There you could also see all the other options.

Thank you, that was what I needed.

> But when you wanna compile with MSVC you could use Visual Studio for
>  developing. I never use nmake for building Kst: developing with 
> Studio, deploying with mingw.
> 
> Open a Visual Studio shell, add the path to qmake (set 
> PATH=C:\Qt\...\bin;%PATH%), create a build folder on the same level 
> as the Kst checkout and call within the build folder
> 
> cmake ..\kst\cmake -G"Visual Studio 10"
> 
> Open the solution file kst.sln from command line. I'm sure this will 
> work.

Thank you for the advice. Yes, this worked up to a point. The
KstPchSupport.cmake file uses the following line (line 73) to generate
the precompiled header settings (when using the IDE):
    set(use_pch "/Fp${_header}.\$(Configuration).pch")

However, it would need to be as follows in MSVC2008:
    set(use_pch "/Fp${_header}.\$(ConfigurationName).pch")

If $(Configuration) works in MSVC2010 does that mean that 2010 is the
only MSVC compiler that Kst officially supports or is it meant to work
in 2008 as well? I am downloading 2010 now in any case :)

Apart from that everything built successfully.

> To start over the best way is to completely clean the build folder.

Yes, and also to maintain a build folder separate from the sources. I
fell into that trap once before and ended up checking out the sources
again because it was too messy to clean :)

Cheers.
David.



More information about the Kst mailing list