Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Solved Can't build Qt Creator project on a Windows machine, which has QNX Momentics installed on it

    General and Desktop
    2
    5
    998
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Xequtor
      Xequtor last edited by

      Hello All,

      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?

      Best Regards,
      Ahmed

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @Xequtor last edited by

        @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?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 1
        • Xequtor
          Xequtor last edited by

          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.

          Best Regards,
          Ahmed

          jsulm 1 Reply Last reply Reply Quote 0
          • jsulm
            jsulm Lifetime Qt Champion @Xequtor last edited by

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

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • Xequtor
              Xequtor last edited by

              Thanks. I will try to set the variables in the model.

              Best Regards,
              Ahmed

              1 Reply Last reply Reply Quote 0
              • First post
                Last post