Code::Blocks Forums

User forums => Help => Topic started by: jarro_2783 on June 07, 2008, 02:55:42 am

Title: finding source files when using autotools
Post by: jarro_2783 on June 07, 2008, 02:55:42 am
I'm using autotools for my projects, so I tick the "This is a custom makefile" box and it all works fine until I get a compile error or warning.

I've got all my files in a sub directory of the root project directory. Because of the way autotools sets things up, gcc reports errors as occuring in filename.h or filename.cpp, but codeblocks can't find them because it expects them in src/filename.h, does anyone know if there is a way to let codeblocks know about the path difference?
Title: Re: finding source files when using autotools
Post by: MortenMacFly on June 07, 2008, 04:32:00 pm
does anyone know if there is a way to let codeblocks know about the path difference?
This is not possible with custom Makefiles. The reason is simple: You don't have a 1:1 relation. Another file with the very same name could be under another folder. So C::B really can't know whichg one to open just by it's filename. No matter if you tell C::B were the sources are.

So unless you don't have a C::B project which includes all your source files (you most likely wouldn't use Makefile than anyways) there is nothing we can do. Only Make knows what to do as it has it's Makefile. C::B just runs Make.

Probably it's time for you to create a "real" C::b project... Besides C::B would really know your sources you could take advantage of many more features of C::B... way more than Make can do... ;-)
Title: Re: finding source files when using autotools
Post by: jarro_2783 on June 10, 2008, 07:08:51 am
I kind of like the autotools setup though. For uni our lecturer requires us to use autotools. I could however use both.
Does codeblocks have a "make dist" equivalent?