Code::Blocks Forums

User forums => Help => Topic started by: timt on June 02, 2005, 03:13:37 pm

Title: Problems with custom makefiles
Post by: timt on June 02, 2005, 03:13:37 pm
I've just installed CodeBlocks 1.0 final beta (on linux) and am playing around with it.

One of the first things I did was create a project a import some existing source files into it.  These files have a Makefile, which works correctly on its own.  I have checked the "This is a custom Makefile" box in the Project options.  I've read the FAQ, specifically Q2.4 about compiling with custom Makefiles.  At the end of that section of the FAQ it says "Also make sure that "GNU make" is the selected build method for the specific compiler."   I assume this means that under Settings -> Compiler -> Programs tab, "make" should be listed for the "Make program" option.  But I'm not sure if I should also replace "g++" with "make" in the "C++ compiler" option?

Actually, it still doesn't work either way.  If I leave g++ as the C++ compiler, my custom Makefile does not get used so I get a load of link errors.  If I replace g++ with make in the C++ compiler option,  I get the following compile-time error:

make: invalid option -- c

This "c" option is nothing to do with my Makefile - it must be something the CodeBlocks is adding somewhere.

Has anyone else experienced this problem?  Am I doing something wrong, or is this a bug?
Title: Problems with custom makefiles
Post by: rickg22 on June 02, 2005, 06:07:15 pm
Quote

At the end of that section of the FAQ it says "Also make sure that "GNU make" is the selected build method for the specific compiler." I assume this means that under Settings -> Compiler -> Programs tab, "make" should be listed for the "Make program" option.


No, it means that the compiler's build method (in ADVANCED options) is set to "Use Makefiles" instead of "Use compiler directly".

Hope that helps. :)
Title: Problems with custom makefiles
Post by: timt on June 03, 2005, 10:36:29 am
Thanks for the reply! It works properly now (actually it is in the Settings->Compiler->Other tab).