QtCreator Build Environment config file?
-
Hello everyone,
I'm facing issues with QtCreator and MSVC compiler, I assume this is because I have the Win10 SDK and Win 8.1 SDK installed.
Anyway, currently I have to modify the Build Environment Path of my projects to include the Win Kit 8.1 so that make can find the
RC.exe
I need to do that everytime I create a new project or open one where I haven't changed it yet.
Is there a away to automate this in QtCreator, because I would rather not modify my global path variable, if I can avoid it.
Greetings.
-
thanks @aha_1980
it works perfectly!Just a note, the example in the docu batch-editing is wrong
PATH=/opt/bin:${PATH}
ought to be
PATH=/opt/bin;${PATH}
In case someone else comes upon this thread.
-
Hello everyone,
I'm facing issues with QtCreator and MSVC compiler, I assume this is because I have the Win10 SDK and Win 8.1 SDK installed.
Anyway, currently I have to modify the Build Environment Path of my projects to include the Win Kit 8.1 so that make can find the
RC.exe
I need to do that everytime I create a new project or open one where I haven't changed it yet.
Is there a away to automate this in QtCreator, because I would rather not modify my global path variable, if I can avoid it.
Greetings.
-
Possibly you can use .qmake.conf in an upper folder and add the path there.
However, this may help only if you are not already using .qmake.conf extensively. All depends at the end what you are trying to achieve.
Hope that helps.
hi, @koahnig
I thoughtqmake.conf
is only used formake
to create qmake?My idea was to modify the
*.pro.user
file creation and add on to the<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges">
tag, but I don't know where to start with that, where QtCreator takes its information/template to create the pro.user file.
Mmh, this may be a question better asked in the QtCreator-Mailing list 🙃
-
hi, @koahnig
I thoughtqmake.conf
is only used formake
to create qmake?My idea was to modify the
*.pro.user
file creation and add on to the<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges">
tag, but I don't know where to start with that, where QtCreator takes its information/template to create the pro.user file.
Mmh, this may be a question better asked in the QtCreator-Mailing list 🙃
You are right that the question might go deeper than most users here will have experience.
You can use .qmake.conf and simply add qmake commands which are used in .pro files in sub-folders. The thing I am doing now is to have a special target folder for executables. I have projects using subdir templates and some statements were not carried into the executation of the sub folder .pro files.
Now I am basically having a central point to add statements which are used in sub-folders then. The only disadvantage is that you should not forget to rerun qmake when you have changed the .qmake.conf
-
hi, @koahnig
I thoughtqmake.conf
is only used formake
to create qmake?My idea was to modify the
*.pro.user
file creation and add on to the<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges">
tag, but I don't know where to start with that, where QtCreator takes its information/template to create the pro.user file.
Mmh, this may be a question better asked in the QtCreator-Mailing list 🙃
-
you can modify the Environment in the Kit settings and i think you could inject a modified PATH there. That would apply to all projects using this Kit.
-
thanks @aha_1980
it works perfectly!Just a note, the example in the docu batch-editing is wrong
PATH=/opt/bin:${PATH}
ought to be
PATH=/opt/bin;${PATH}
In case someone else comes upon this thread.
-
thanks @aha_1980
it works perfectly!Just a note, the example in the docu batch-editing is wrong
PATH=/opt/bin:${PATH}
ought to be
PATH=/opt/bin;${PATH}
In case someone else comes upon this thread.
@J.Hilk said in QtCreator Build Environment config file?:
PATH=/opt/bin:${PATH}
ought to be
PATH=/opt/bin;${PATH}I cannot comment on this, but can you please create a bugreport? It may either be a program or documentation bug, and the only way to clarify is to ask the maintainers.
Thanks
-
thanks @aha_1980
it works perfectly!Just a note, the example in the docu batch-editing is wrong
PATH=/opt/bin:${PATH}
ought to be
PATH=/opt/bin;${PATH}
In case someone else comes upon this thread.
@J.Hilk said in QtCreator Build Environment config file?:
ought to be
It ought not. That's the way the path is constructed on Linux - using a colon as separator. ;)
-
@J.Hilk said in QtCreator Build Environment config file?:
ought to be
It ought not. That's the way the path is constructed on Linux - using a colon as separator. ;)
@kshegunov
ohhhhh, of course! Thats explains it.
It's still confusing though, the paragraph before has a picture of a cleary Windows based environment! -
@kshegunov
ohhhhh, of course! Thats explains it.
It's still confusing though, the paragraph before has a picture of a cleary Windows based environment! -
@koahnig I agree and therefore did so: