Error when compiling project with QT

Asked

Viewed 281 times

0

Hello, I’m a beginner in Qt, I took a C++ course with QT in 2013 but I couldn’t take the learning forward and now I’m resuming. Now I’m trying to compile a simple project, just create a new project in Qt widget, it automatically creates a main screen and I haven’t touched anything, I just tried running this program created by the IDE itself and the following error occurs:

inserir a descrição da imagem aqui

Compiler generated alerts (contained in the image):

Warning: Overriding Recipe for target 'debug/main. o'

Warning: ignoring old Recipe for target 'debug/main. o'

  • 3

    Copy the log error and paste here. Also enter the code if it is not impossible to find out which file is failing. See more.

1 answer

2


Edson, this image you linked shows 2 warnings, warning that you are overwriting build targets.

In this case you have specifically set the name of your project’s main window to "main", which is the exact name of the file generated by Qt Creator to initialize the program in C++ (main.cpp), so you prevent the project from starting at the Qt default.

I recommend you change the name of the main window to anything other than "main", for example Mainwindow (Qt Creator default suggestion).

I hope I’ve helped.

  • Bruno Bermann, I changed the name of the form and it worked. It is the force of habit, in other languages I always used main to the main screen, thanks for the tip.

  • As for the format of the question, I’m going to try to improve from now on, have a little patience there guys, I’m a beginner in both the forum and QT, and let’s move on.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.