Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Create a GUI with Qt for my code developed in C++/CLI with VS2017



  • Hi Qt community

    I am new in this Qt world and I wonder how is the easy way to create a simple GUI for my code, which has been developed in C++ with VS2017. What I tried is to integrate Qt for VS2017 (Qt VS Tools) and I created a simple FirstQt example that just closes the window, but now that I have added part of my code for image mosaicking (based on openMVG libraries), it output 2 error messages:

    • the argument to a feature-test macro must be a simple identifier
    • moc (C:\Qt\5.12.3\msvc2017_64\bin\moc.exe)

    Is there a way to fix these errors and continue working with Qt VS Tools? What are other options to use exactly the same code I implemented?

    Thank you in advance

    Daniel


  • Lifetime Qt Champion

    Hi
    If the mosaicking code is pure c++, it should be no issue mixing in some Qt.

    For the error
    "the argument to a feature-test macro must be a simple identifier"
    there is no file name or line number to give hints ?



  • Hi @mrjj

    Yeah, the mosaicking code is in pure c++ and I used the library openMVG.

    The error points the line in which Q_OBJECT was defined inside any class, and I think it happens when you have an error which your code inside that class. I noticed one error inside my code and when I fix it, this moc error fixed too.

    Thank you


Log in to reply