Code::Blocks Forums

User forums => Help => Topic started by: kai7 on September 20, 2006, 11:17:54 am

Title: Problems with own makefile (mostly breakpoints don't work)
Post by: kai7 on September 20, 2006, 11:17:54 am
Hi,

I have some problems with C::B using an own makefile. Here is the Situation:

The directories are:
DirContains
D:\Daten\C++\FrontDesignThe main directory of the project
D:\Daten\C++\FrontDesign\srcAll the source code
D:\Daten\C++\FrontDesign\FrontDesign.wxThe makefile generated with autoconf
D:\Daten\C++\FrontDesign\FrontDesign.wx/srcThe object files

I am using gcc 3.4.5 and the gdb 6.3.2.

First I have a smaller problem:
C::B is running make in the main dir of my project, but there is not the makefile. Is there a way to change it? As a workaround I wrote a wrapper script that is called instead of "make"

And a bigger one:
Breakpoints don't work. When I set a breakpoint and start GDB I get the following messages:
Code
> break D:/Daten/C++/FrontDesign/src/MainWin.cpp:322
No source file named D:/Daten/C++/FrontDesign/src/MainWin.cpp.
Breakpoint 1 (D:/Daten/C++/FrontDesign/src/MainWin.cpp:322) pending.
The program is compiled with dedbug symbols. The problem is, that gdb can't handle the absolute paths. When I start gdb manually and enter this:
Code
break MainWin.cpp:322
Breakpoint 1 at 0x4ae28c: file ../../src/MainWin.cpp, line 322.
or this:
Code
break ../../src/MainWin.cpp:322
Breakpoint 1 at 0x4ae28c: file ../../src/MainWin.cpp, line 322.
it's working well. I think the problem is, that the code was compiled using relatives paths and gdb can't convert them to the absolute paths.

Any ideas?

Thank you
Kai
Title: Re: Problems with own makefile (mostly breakpoints don't work)
Post by: mandrav on September 20, 2006, 11:23:30 am
I think I 'll make it an option (use relative paths or not) because some projects work with absolute paths and some don't...
Title: Re: Problems with own makefile (mostly breakpoints don't work)
Post by: kai7 on September 20, 2006, 12:53:29 pm
This would be a good solution. So thank you very much...

-Kai

P.S.: I just looked through all the IDEs I found and I really think that C::B is the best free IDE you could get. Thank you for the great work.
Title: An additional problem.
Post by: kai7 on September 20, 2006, 10:14:51 pm
I have forgotten another problem (I workarounded it a while ago). C::B isn't able to find the files in the error messages of the compiler because they have the form: "../../src/MainWin.cpp:458: error: [...]". The workaround was to change regular expression of the error parsing (adding "\.\./\.\./" before the brackets for the file name).

Perhaps an option to specify a make working dir would be nice...

-Kai