Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: florent on February 15, 2007, 12:57:18 am
-
Hi all,
I am compiling a project using a custom Makefile (generated by the GNU autotools). All source and header files are in a subdirectory named "src". When I compile the project, 'GNU make' does not indicate the path to erroneous files because it is internaly recorded by 'make'. As a result, C::B can't go to the erroneous lines in my code because it doesn't find source files in the project's top directory :(. If I put the sources in the top directory (without using a subdirectory "src"), C::B is able to go to the erroneous lines. Is there a way either to force 'GNU make' showing complete file paths, or to indicate to C::B where the source and header files are located?
Thanks a lot in advance!
ps: I come from eclipse and it seems to me that C::B is far better for C++ than eclipse/CDT :D ...unless I can't jump to erroneous lines in my "src" subdirectory :lol:
-
Hum... No ideas? I'd just like to know if this feature is implemented or not.
I read the FAQ where it is indicated that one has to change "build method" to "work with makefiles" in order to compile with custom makefiles. Nevertheless, I can't change the build method because the associated list box is disabled and points to "invoke compiler directly". Is it a bug?
I compiled C::B revision 3595 from source with wx2.6.3 under linux Ubuntu edgy 6.10 (g++ 4.1.2).
-
Hum... No ideas? I'd just like to know if this feature is implemented or not.
I read the FAQ where it is indicated that one has to change "build method" to "work with makefiles" in order to compile with custom makefiles. Nevertheless, I can't change the build method because the associated list box is disabled and points to "invoke compiler directly". Is it a bug?
I compiled C::B revision 3595 from source with wx2.6.3 under linux Ubuntu edgy 6.10 (g++ 4.1.2).
This option is disabled because it will be removed. To use a custom makefile is enough to define it in the project properties dialog (as you probably already did).
About the error messages, it's a known limitation currently for makefile-based projects. The reason is what you said already: make enters each dir in succession to compile the files and so any error messages printed refer to local files (to that directory). We are looking for a workaround...
If you know of a "make" command line option that changes this behaviour, you can change the way C::B invokes "make" in the project build options dialog.
-
I found a nice solution. One has just to use a single custom Makefile in the project's root directory. GNU autotools are able to generate a single Makefile if there is a single Makefile.am in the root directory. Therefore, gcc's error messages are relative to the project's root directory so that C::B can find the erroneous files :P
For more informations, see this excellent blog: http://www.mega-nerd.com/erikd/Blog/CodeHacking/nonrecursive_automake.html