Qt project with visual studio, compilation time
-
Hello,
I have a C++ Qt project that I develop with visual studio 2022, using the Qt VS tool.
Everything works fine, except that when I change a .h file (for instance adding a int variable), the project compiles in 3 minutes.
When I do exactly the same (i.e adding a variable on a .h file), with Qt creator, it takes only 40 seconds to compile.
When I modify a .cpp file, it's much quicker and I don't have a big difference of compilation time between Qt creator and visual studioDo you have an idea on why there is such a big difference on the compilation time in Qt creator and visual studio, and how could I solve that?
Thank you. -
Hello,
I have a C++ Qt project that I develop with visual studio 2022, using the Qt VS tool.
Everything works fine, except that when I change a .h file (for instance adding a int variable), the project compiles in 3 minutes.
When I do exactly the same (i.e adding a variable on a .h file), with Qt creator, it takes only 40 seconds to compile.
When I modify a .cpp file, it's much quicker and I don't have a big difference of compilation time between Qt creator and visual studioDo you have an idea on why there is such a big difference on the compilation time in Qt creator and visual studio, and how could I solve that?
Thank you.@Pierre_VBI Is it the same code base you're building in VS and QtCreator and is it the same header file you're changing?
-
Hello,
I have a C++ Qt project that I develop with visual studio 2022, using the Qt VS tool.
Everything works fine, except that when I change a .h file (for instance adding a int variable), the project compiles in 3 minutes.
When I do exactly the same (i.e adding a variable on a .h file), with Qt creator, it takes only 40 seconds to compile.
When I modify a .cpp file, it's much quicker and I don't have a big difference of compilation time between Qt creator and visual studioDo you have an idea on why there is such a big difference on the compilation time in Qt creator and visual studio, and how could I solve that?
Thank you.@Pierre_VBI
...And do they use identical compiler options, e.g. wrt pre-compiled headers...? -
@Pierre_VBI Is it the same code base you're building in VS and QtCreator and is it the same header file you're changing?
@jsulm yes exactly the same
-
@Pierre_VBI
...And do they use identical compiler options, e.g. wrt pre-compiled headers...?@JonB I guess everything is the same.
Actually I started this project with Qt creator, and used the option on the .pro file :
TEMPLATE = vcapp
This generates automatically the same project on visual studio (.cvxproj file, with normally the same options)