Important: Please read the Qt Code of Conduct -

Cant build app as Debug. "No rule to make target"

  • Hey, Im trying to build app as Debug, cuz I want to use Profiler (windows, external profiler). Building as Release work's fine.

    :-1: error: No rule to make target 'C:/Qt/32_5125_Static/32_5125_Static/lib/libQt5QuickControls2d.a', needed by 'debug/Minecraft-Clicker.exe'.  Stop.

    Im using 5.12.5 Mingw 32bit kit Static.

    Seems It's adding "-d" suffix to lib name - why?
    There is no file libQt5QuickControls2d.a but libQt5QuickControls2.a exist.

  • Lifetime Qt Champion

    The little d is normal and means its looking for a debug version of the lib.
    Since its a static build, it might not be included.

  • @mrjj Fug, it's possible to add those files / modify statc build?

  • Lifetime Qt Champion

    Only by recompiling it as debug version as far as i know.
    You could just use a non static Qt and debug in that if you just want to
    Profile some of your own code ?

  • There is a flag to tell qmake that you want debug symbols no matter what the optimization level of the build is.

    qmake CONFIG+=force_debug_info "$DIR"

    Full running example:

    Especially since you mention profiling, that might serve your use case BETTER than a debug build. Debug build is going to have bottlenecks that an optimized build won't have, so you may end up focused on fixing bottlenecks that wouldn't have been there in the Release build anyway. (I assume that @BD9a already knows that. I am just stating it for the general public who may come and read this thread later.)

Log in to reply