Question:
which program to use for C++ Programming?
anonymous
2011-06-28 00:22:16 UTC
hello friends i am learning c++ and i m a graphics concerned person. I have used turbo c, c-free, code:blocks and even visual c++ but nothing satisfied me. Please help me, i want a program for c++ programming which has an interface similar to linux/mac command line interface. for those who haven't seen it here's a picture:
1. http://www.robertvenema.nl/journal/wp-content/uploads/howto-command-line-unrar-on-mac-os-x/unrar-howto-02.png

i dont mean the output but the text editor interface i want similar to it, on windows operating system. Please help me out.
Three answers:
CPlusPlus Guru
2011-06-28 00:57:48 UTC
On Windows, if you don't want an IDE but prefer to work from the command line, you need three separate things:

- a command-line shell. Windows comes with cmd.exe, or you can download GNU bash if you want a Unix-style command set.

- a compiler, and preferably also a Make program. You can download the GCC (GNU compiler collection), or the Borland "free command-line tools" - the file freecommandLinetools.exe self-extracts and contains the Borland 5.5.1 C/C++ compiler, Borland make, and a few other utilities. Borland requires you to create two configuration files with a total of 3 lines; GCC installation may be more involved.

- a text editor. You can use Notepad, but that's horrible. Wordpad is a little better. Word will ask you every time if you really really want to save the file in a non-Word format. Free editors with some support for programming are Textpad (with syntax highlighting), and for the "real programmers", GNU emacs or JASSPA MicroEmacs.



When you're comfortable with it, I suggest you download wxWidgets (formerly wxWindows) from wxWidgets.org, for developing graphics- and GUI-based programs. It works with both GCC and Borland.
John
2011-06-28 01:15:38 UTC
In Linux, people often do not use the command prompt for programming. The use of IDE's is much more convenient. However, sometimes they use the command line to compile programs or to run the make command to compile programs as described by a Makefile. However, with things such as emacs, Code::Blocks, KDevelop, etc, linux programmers do not even have to use the command line for that. So I am not sure why you are saying you want an interface similar to linux/mac, when the use of Code::Blocks will give you one.... I know because I use Code::Blocks when I program in Linux.



Anyways, if all you are after is a command line interface to compile programs, then you have options. I know the regular versions of Visual Studio (I'm not sure about the express versions) have a way to access command prompt development/compile features. It can be accessed via the start menu -> Microsoft Visual Studio 2010 (or whatever year yours is) -> Visual Studio Tools. I never use it, so I do not know what tools are available from the command prompt. I know this isn't quite the same as the regular command prompt because it has environmental variables set up to take advantage of VS's tools. I suspect it has compile and some debug features.



However, if you want to stay away from MS VS and only want to be able to compile or use basic things like 'make' from the command prompt, you can install MinGW. It comes with one of the installations of Code::Blocks. I have the environmental variables on my computer set up to look in that directory so I can access the gcc compiler from the command prompt, just like in linux. However, MinGW only install the minimum number of tools (thus, the Min in the name MinGW) and does not support posix. If you want more linux and command line tools, MinGW's website suggests that you install Cygwin and some of the additional packages available to it, instead of MinGW. I have never used Cygwin, so I cannot give you details on how well it works.After a quick glance at the packages available to it, I suspect this will meet your needs for a CLI that has development features like linux.



Also, if you want to get a couple of the common text editors used by older linux developers, you can get windows ports of the Emacs and Vim editors.



If all of these options fail to meet your needs, then install Linux.... you can either partition your hard drive and dual boot or your you can install a virtual machine, such as the free VirtualBox, and install Linux on it.
peteams
2011-06-28 01:00:58 UTC
If you have Visual C++ installed (assuming Express is the same as professional versions), then you should have a start menu item Visual Studio 2010 -> Visual Studio Tools -> Visual Studio Command Prompt (2010). That fires up the Windows command line shell with the environment set for command line use. You can then use CL for compiling, LINK for linking, etc.



If the Windows command line shell is not to your liking, then you can use either Microsoft PowerShell, which is Windows' new command line scripting language, or Cygwin, which is a UNIX shell for Windows.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...