Very novice question
Hi everyone
I am in the very beginnings of teaching myself to program in C++. I have tried to use a graphical editor/compilor called Geanie. When I compile my practice programs everythings seems to go fine. However, when I attempt to build with "make" I get an error: error: no target for "make all" unsuccessful build I know to most of you this is an irratatingly simple question, but as I am trying to do this simply from books, these little nagging things hold me back. Would someone be kind enough to explain this error to me and tell me how to avoid it and build the practice programs so that they are executable? Any help appreciated. Bob |
you don't really need 'make' to run them locally. do they run as ./yourfilename from the terminal?
|
Yes, they do. I am able to output the practice programs fine. I suppose I am trying to learn to use the graphical compilers (like KDevelop) as well as the language itself. I also want to be able to run them by just typing in the filename without ./myfile. I was able to do this once in Eclipse, but can't really remember how I did it.
Thank you for your response. Any extra help from experienced programers is appreciated. Bob |
An error line
Code:
error: no target for "make all" unsuccessful build |
if you have a simple C/C++ program,
e.g: "hello.c" simply typing make hello will compile and link as you would expect. When you are making, I take it it's in a GUI. Obviously this is simply calling make all and expecting a makefile. Here's a simple makefile that should work for you. (assuming you have makedepend installed) Put it in the project directory and call it "Makefile". If you cut and paste and the makefile has errors, it may be because the indented lines MUST be indented with TAB characters. This is essential. Code:
# --------------------------------- |
Thank you very much for the help...I have copied this and made note of your instructions. I need more study to properly use this information, but you have helped a lot. Learning this on my own with no classroom or instructor training is a little more difficult than I thought.
Thanks again Bob |
look in the build menu and try the option 'run automake and friends' and see if you can build after that..
|
no probs bob.
it's not difficult, there's just a lot to learn and you can only assimilate at a certain rate. You'll get there, just be patient! make is a particularly arcane tool. very useful and powerful but also incredibly, infuriatingly, confusingly annoying at times. It took me quite a while to get my head round it. |
All times are GMT -5. The time now is 10:32 AM. |