0

When Qt builds my project, it tries to do it both in the debug and release modes. However, I'm using an external library which I only have in debug mode. I'd like then to prevent QtCreator from building my project in the release mode so I won't have problems with the linker (I'm having problems with redefinitions when using "mixed-mode" libraries)

Renan
  • 1,910
  • 4
  • 22
  • 36

1 Answers1

-1

Go to project->Build Configurations and next to the pulldown menu with "Debug" and "Release" press "remove" when you have the "Release" configuration selected.

Why not just not select Release, and just build in Debug mode?

rubenvb
  • 74,642
  • 33
  • 187
  • 332
  • In Creator 2.4.1, I do not see a "Projects" menu. Do you mean the "Projects" tab on the left? If so, when I click that, I only see "Build Settings" (not Build Configurations), and then I don't see anything about Debug or Release. Has something changed? – David Doria Aug 17 '12 at 17:39
  • @DavidDoria yes, these things vary with the versions. But I do believe 2.4 already had what I'm talking about. – rubenvb Aug 17 '12 at 22:39
  • I am using a CMake project. I think that the interface changes with the build system. I believe that currently the only thing to do is open the build directory in a terminal, run ccmake and change CMAKE_BUILD_TYPE. This is very clumsy, but seems to work. – David Doria Aug 18 '12 at 13:03
  • 2
    @DavidDoria ah yes, but you can also run CMake from within the IDE, and pass any number of options to it (in your case `-DCMAKE_BUILD_TYPE=Debug` or `Release` or `RelWithDebInfo`). – rubenvb Aug 18 '12 at 13:20
  • There is no such menu item. And neither is in `Tools -> Options`. – Tomáš Zato Dec 03 '15 at 14:51
  • @rubenvb comments are not answer. And whatever I saw in answer does not solve the problem. – Tomáš Zato Dec 03 '15 at 14:55
  • @TomášZato Have you taken a moment to look at the date of both the question and the answer? Also note that the question itself does not contain the information that invalidates this answer (i.e. the OP has a CMake project), which is only clarified in comments, and those same comments contain the solution to the newly posed question, _in comments_. Also note the OP accepted the answer, with comments. So in the future you'd do well to read the whole context. – rubenvb Dec 04 '15 at 08:34
  • 1
    Nope, the downvote button specifically says "this answer is not useful". It doesn't say anything about comments. It's natural that old answers, as they age are downvoted and replaced by up-to-date answers on hot questions. And what OP wants or not is irrelevant at this point - if this was all about OP's original request and not what people from search engines want, the answer and question could be deleted after the problem is solved. – Tomáš Zato Dec 04 '15 at 10:10