User forums > Help

How to debug application compiled from an external Makefile ?

(1/2) > >>

rix:
Hi there,

I'm working on an application based on Qt opensrc edition.
I setup the following options in my project:

  Project - Properties - [X] This is a custom Makefile
  Build - Compiler options - Others - Build method: Work with Makefiles

to be able to properly compile by using the Makefile generated by qmake.
However, when I try to debug, I get the following:

  Selecting target: default
  Compiling: failed
  Aborting debugging session

So I tried to change the following:

  Project - Properties - Target - default - Type: Command only

But in this case, I get a message "Can't debug such a target..."
I'm using C::B 1.0-rc2 + MinGW 5.0 (so independant to C::B) + gdb 5.2.1

So how can I debug through C::B but at the same time compile from an external makefile?
(my objective is in fact to be able to use qmake generated Makefiles as much as possible, while being able to use C::B wonderfull editor and debug features at the same time)

rix:
... no one having an idea ? :(

Compilation from C::B is working properly (by using my existing makefile), but I'm unable to debug (either with a 'Compiling: failed' message or a 'Can't debug such a target' message)!
I really would like to use C::B to edit and debug, so if someone has any idea on how to create such a project, it would be really helpful to me.

Michael:
Hello,

Just a small suggestion. May be you can try to search the C::B forum for Qt topics. There are some and may be one of them could be useful. You can also try to write an email to Qt-interest forum. May be someone can help you.

Best wishes,
Michael
 

mandrav:

--- Quote from: rix on November 21, 2005, 10:17:44 am ---... no one having an idea ? :(

Compilation from C::B is working properly (by using my existing makefile), but I'm unable to debug (either with a 'Compiling: failed' message or a 'Can't debug such a target' message)!
I really would like to use C::B to edit and debug, so if someone has any idea on how to create such a project, it would be really helpful to me.

--- End quote ---

The problem lies in the debugger trying to make sure everything is built before debugging so that you 're actually debugging an up-to-date version of your code.
When you get this:

--- Code: ---  Selecting target: default
  Compiling: failed
  Aborting debugging session

--- End code ---

what is printed in the Build Log?

rix:
Thank you very much for the suggestions, guys!


--- Quote from: mandrav on November 21, 2005, 10:58:36 am ---what is printed in the Build Log?

--- End quote ---

Well, the debugger is starting now.
In fact, the Makefile autogenerated by qmake didn't contain a 'default' rule, but only 'debug' and 'release' rules. ;)
I renamed the 'default' rule to 'debug' in C::B, and the debugger started!
However, now, I'm having the following problem:


--- Code: ---Starting debugger: done
Adding source dir: Z:\qt_applications\current\qt\
Adding file: Z:\qt_applications\current\qt\qt_app.exe
Changing directory to: Z:/QT_APP~1/current/qt
ðò: No such file or directory.
error
error

--- End code ---

The debugger seems to be started anyway (Debug - Debug command is grayed, and Debug - Stop debugger is enabled), but I can't use any debug commands.
Any idea on where these 'No such file or directory' and 'error' messages come from?

Navigation

[0] Message Index

[#] Next page

Go to full version