• Advertisement
Sign in to follow this  

compiling with command-line on linux

This topic is 4651 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to start developing on my linux box. I have been using dev-cpp on my windows, but it doesn't appear to have that for my new OS. If noone can recommend a good IDE for linux, can anyone give me instructions on compiling a program on linux from the command line? I know I need to make a makefile, but I have no idea how that works. Actually, an example would be good. Say I have these files: genericclass.h genericclass.cpp (functions for genericclass.h) morefunctions.h morefunctions.cpp main.cpp (has the main function) How would I make the makefile for these, and how would I compile and link it into a binary. Oh, it might be a good idea to mention that I'm using Visual Basic. </sarcasm>. I'm using C++.

Share this post


Link to post
Share on other sites
Advertisement
Read this

But since I sure don't wan't to do that all the time I use Mingw Studio. Development just recently started back up on it and it's a nice IDE.

Then there is Anjuta and KDE but I can't stand them, it takes like 3 minuts just to build one project.

Share this post


Link to post
Share on other sites
HA! I actually found that on my own. Guess I should have looked harder. But where I am, its midnight + .5 and I am too tired to think of looking before posting. Sorry. But I can start coding tomorrow! w00t.

Share this post


Link to post
Share on other sites
The official documentation might help. make is quite powerful and has some features that produce nice but strange looking commands with some scoped variables. It isn't really complicated, it's just another scripting language.

Have a good look at the special variables and the special targets. Also make sure your editor of choice isn't set to replace tabs with spaces since this would break the makefiles (make is a bit like Python in this matter, it puts semantic value on whitespace which is one of the worst problems with it ever since the beginning).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement