New c++ class added with Qt wizard, not compiled



  • I added a C++ class in my project. The .cpp and .h files appears in my directory, and the corresponding lines are added in the .pro file. The editor recognize the new class, as the color appears correct when introducing a new object. But the .obj is never built, and I gor an unresolved external with the new object. The .obj is not built when compiling just the new class file. The only error is "Target debug/xxx.obj doesn't exist.".
    (W10, Qt Creator3.5.1, based Qt5.5.1 (MSVC2013) )
    I hope someone can give me an idea to compile this file.



  • Did you rerun qmake?



  • @JohanSolo yes, several times. I removed the "jom" option, and set it again. I changed the compile directory to and fro.
    I suspect a non consistency between the "Compilation step" in the project page, that is "qmake : qmake.exe xxx.pro -r -spec win32-msvc2013 "CONFIG+=debug", with a Win32 mention, and the "Tools/options / Kits", which holds "Desktop Qt 5.5.1 MSVC2013 64bits"
    But I have no idea to get a better consistency.



  • @JohanSolo : pb solved. I create a new project with all the components of the old one, and everything runs well. Maybe it was to run again the configuration step.



  • @Furkas said:

    @JohanSolo : pb solved. I create a new project with all the components of the old one, and everything runs well. Maybe it was to run again the configuration step.

    I'm glad you solved your problem.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.