Code::Blocks Forums
User forums => Help => Topic started by: boom on August 17, 2008, 01:57:06 pm
-
Hi,
since a few days i'm trying to change the build method to "use makefiles", but i can't because the "build method"-option is disabled.
I'm using C::B 8.02 and Ubuntu 8.04 and i've installed gnu make.
Any idea how i can solve this problem?
-
I have the exactly the same problem. I want to use a custom makefile but the option you are supposed to activate isn't even there.
-
Go to the first tab of your projects properties and check the "This is a custom Makefile" checkbox.
Be sure that the name of the makefile is spelled correctly (especially on Linux :"makefile" != "Makefile" !!!).
Then open "Build options..." and switch to the right-most tab ( "Make" commands ) and change the commands to work with your makefile.
-
Thank you for the help. Unfortunetely there is no tab under "Build options" that has anything to do with make. The rightmost tab is "# defines" This anything familiar? I've seen a few other posts with similar topics.
-
Thank you for the help. Unfortunetely there is no tab under "Build options" that has anything to do with make. This anything familiar? I've seen a few other posts with similar topics.
Then open "Build options..." and switch to the right-most tab ( "Make" commands ) and change the commands to work with your makefile.
If you have opened the "Build options", there is a small black triangle at the right side of the tabs, click on it, until you come to the rightmost of them.
-
Haha now I feel so stupid =)
Well, now the next problem is what I want to change the commands to. Only thing I did when I compiled in the shell was write make in the folder with the cpp file and makefile and then it was done. Any pointers on what needs to be done?
EDIT: Well still don't know what I'm gonna change in the Build Options tab you mentioned but I think I've found another problem. The FAQ on the wiki says; In "Compiler Settings", under the tab "Other", there's a setting called "Build Method". Choose "Work with makefiles".
But the "Build Method" setting is greyed out and cannot be changed by some reason.
-
See this post of mine help you; been up all night so not able to help much right now.
Tim S
http://forums.codeblocks.org/index.php/topic,8678.0.html
-
See this post of mine help you; been up all night so not able to help much right now.
Tim S
http://forums.codeblocks.org/index.php/topic,8678.0.html
Well I see it but still nothing =) A problem for me is also that I don't have good knowledge of makefiles. The one I use was made for me. Guess I should learn how to use makefiles better before bothering you guys with issues ^^
-
If you normally only type "make", just remove the "$target" from the build command in the "Make commands" tab.
As I wrote before be sure you have spelled the name of the makefile correctly in projects properties. And the path (if any) to the makefile is relative to the projects root directory.
-
Well then, looks like problem is solved. Double up actually. I can now choose to compile either with the makefile and the usual way. Had to fiddle with include files and some libs.
Thank you both for the help. It's always nice to see that there are people willing to help newbies without throwing sarcasm left and right =)