Author Topic: searching for files from build log  (Read 2961 times)

Offline jazzer

  • Multiple posting newcomer
  • *
  • Posts: 30
searching for files from build log
« on: May 17, 2007, 07:28:00 am »
Hi,

I'm trying to build from C::B and just to errors from compiler output.
C::B parses the compiler's output correctly - populates the build messages grid with filenames, line numbers etc. This looks fine.
But when I double-click an error, it doesn't go the the file.

In my case the file is in $(project_base)/dir1/dir2/dir3/file.cpp, and in the build messages grid it's displayed as just file.cpp, with no path information. The file with name "file.cpp" is the only in the project, so there is no problem for C::B to find it just from the file name, even if the path info is missing.

So the questions are:
1. How C::B searches for the file to jump from the error line?
2. Is it possible to instruct C::B where to search for files?
3. Also, is it possible to process somehow the error messages going from the compiler (I know about regexps to match the parts of the messages, but I would also like to process them somehow to provide more relevant information for C::B)

Offline jazzer

  • Multiple posting newcomer
  • *
  • Posts: 30
Re: searching for files from build log
« Reply #1 on: May 21, 2007, 11:39:54 am »
Exactly the same problem with debugging.

As I understand, C::B calls a command ('where' in case of gdb), parses the debugger's output and populates the 'Call stack' window. Please correct me if I'm wrong.
In this window in the 'File' column I see just file.cpp (this is what the debugger returns on 'where'), not $(project_base)/dir1/dir2/dir3/file.cpp.
If I send a command 'list' to the debugger, it shows me the source (i.e. the debugger 'sees' the source file).

But when I double-click the line in the 'Call stack' window, C::B doesn't send me to the file & line, but prints the following message to the 'Debugger' window instead:
"Cannot open file: $(project_base)\file.cpp"


Any chance to get it working?
Is it a bug in C::B or I'm doing anything wrong? To me, looks like a bug.

P.S. I even added the path $(project_base)/dir1/dir2/dir3/ to the project's settings 'C++ parse settings' and 'Debugging settings' - no effect.