Author Topic: finding source files when using autotools  (Read 2072 times)

Offline jarro_2783

  • Multiple posting newcomer
  • *
  • Posts: 99
    • Project Freedom
finding source files when using autotools
« 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?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9597
Re: finding source files when using autotools
« Reply #1 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... ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline jarro_2783

  • Multiple posting newcomer
  • *
  • Posts: 99
    • Project Freedom
Re: finding source files when using autotools
« Reply #2 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?