Compile a Qt project from command Line

前端 未结 3 1641
情话喂你
情话喂你 2020-12-13 03:54

I am developing a application using Qt, the C++ library/framework. Using the QT-Creator I can compile my project just fine and the build directory generates the desired exec

3条回答
  •  温柔的废话
    2020-12-13 04:36

    Thanks for the tips guys. I realized what I was doing wrong. QT-Creator actually takes the first two steps silently.

    1. Create the build output directory
    2. CD to the build output directory (KEY STEP)
    3. Call qmake referencing the .pro file
    4. Call make

    So, the key thing that I overlooked was that you had to be in the build directory first and then call qmake, make etc... And also if the build already has the files compiled it throws that error. I just have to make sure I clean the build directory to compile everything fresh.

提交回复
热议问题