Question:
How do people who don't have Visual Studio use C++ projects?
anonymous
2008-12-20 22:17:43 UTC
I was wondering...when I make a C++ project how can a person run it when they don't have visual studio?
Three answers:
anonymous
2008-12-20 23:03:55 UTC
There is a C++ express edition available for free at http://www.microsoft.com/express/vc/
jplatt39
2008-12-20 23:07:44 UTC
If your only experience with programming is C++ projects I feel sorry for you. I learned programming in C in 1994 in college and we used either Borland's Turbo C which had an IDE editor and project files or the school's Vax VMS computer which we wrote text file programs for and compiled them on the command line. I also had djgpp for a little while till I managed to trash the go32.exe file once accidently and didn't know how to fix it: I also ran it from the command line.



And the command line is what I've used pretty much since the turn of the millenium. DJGPP has an IDE I used for a brief period in '98 but I lost interest in that sort of program WELL before I switched my OS to Linux in 2001.



From the command line I am going to feed the compiler a line like:



g++ -o myprogname -g myprogname.cc myfunctions.cc



Of course there is always a Makefile. Anyhow, I will run it, and there is usually a problem the first time or two after the compiles. I step through thus: I type:



gdb myprogname



and get the program up and running inside the Gnu Debugger. I type l or list and look for a place near the start I can run to. If I don't se one I hit enter, which repeats your last command until I do. Then I will type b 40 -- with 40 standing in for the line number of the place I chose which is usually closer to 10.



Then I type r for run, and it runs to my breakpoint and stops. If I want to look at a particular variable at that point, I type p myvar or print myvar and if I just want to step through the program I type step or step and it will go one step and stop. I repeat it by hitting enter until I get somewhere where I want to look at the variables or where it gives me a segmentation fault or whatever.



In other words, I really do have all the functionality of an IDE when the only file I created was the source code. When the program is out of debugging I can either run strip on the executables or I can recompile it without the -g option.



But really there is that makefile option. I'm putting a tutorial on it into sources.



These options, by the way, are available to you -- maybe not with the same programs but functionally -- from the command line with Digital Mars C, Turbo/Borland C++ and Visual C++. Including and especially makefiles. So you don't need an ide. If you think you do I strongly urge you to try to get your hands on other experiences -- check your documentation for how to do it in Visual Studio and Turbo C++ has command line compilers available for free download. And of course you can get GCC for windows through http://cygwin.com or use it on somebody's UNIX or Linux box (unless it's an Ubuntu box where they didn't download build-essential).
tbshmkr
2008-12-21 01:34:01 UTC
GNU GCC



MinGW



DevC++


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