Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Can't build Qt Creator project on a Windows machine, which has QNX Momentics installed on it
I just installed Qt 5.8 on a PC, running on Windows 7. It has Microsoft Visual Studio 2015 Community. I took the Qt 5.8 version, supporting that Visual Studio version. I also have QNX Momentics for QNX 6.6 on that machine. I created a Qt application project and tried to build it but I keep getting the following error:
"unknown command line option '-' in arguments: '/L-IC:/qnx660/target/qnx6/usr/include'"
I haven't changed any settings in the Qt Creator. Do I have do to any additional changes in some configurations or maybe some Environment variables?
@Xequtor First check the Kit you're using ("Tools/Options.../Build & Run/Kits) - any warnings or errors?
Second: did you (or QNX Momentics) set any environment variables?
Do you have any other Kits?
Can you show your pro file?
Hello @jsulm ,
I saw it today. Thanks to your suggestions, I opened the Environment Variables and saw that I have one Environment Variable, set by QNX Momentics. The variable name is MAKEFLAGS and the value is "-IC:/qnx660/target/qnx6/usr/include". I removed it and everything was built and I was able to run my program. It is good that I fixed this problem, but then I am not sure if the QNX will work fine. Is there anyway to fix this without removing that variable. It is not problem to add it and remove it any time I need to use either Momentics or Qt, but if there is a way to avoid this, I would like to follow it.
Thanks again for the help.
@Xequtor This is a good example why it is a bad idea to set environment variables like this GLOBALLY!
The issue is actually Momentics. It should be possible to set such variables in a project in Momentics, not globally.
Thanks. I will try to set the variables in the model.