Sign in to follow this  
silverphyre673

compiling with command-line on linux

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
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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this