Question:
What is a compiler that can compile outside c++ files?
2010-08-05 22:46:21 UTC
Visual studio does not work because it cannot compile only a single .cpp file, and dev c++ does not have many finctions such as return 0, so is there a good compiler out there that can easily compile a .cpp file. The reason I want this is because whenever you want to output a file in visual studio you can never use the ios::app function for adding to a text file made by another project since it saves the file in the project folder. Also, there is always an error whenever I try to output the file to specified directory.
Three answers:
Nick T
2010-08-07 14:59:07 UTC
Your question is rather confusing.

VS is project based, which is just a 'wizard' driven make file, the actual compilation and make rules are hidden from you unless you want to go poking about under the hood.



The reason it outputs the exe to the project file is that you havent bothered to set up a project with anything apart from the defaults. Show the error and we can tell you why its causing a problem.

You could also append to a file directly by supplying it with a fully qualified path.



As for Dev C++ "not having many functions such as return 0" -- what do you mean? Dev C++ supports standard functions and calling conventions the same as 99% of C++ compilers.
condom
2016-11-01 07:06:37 UTC
gcc and g++ are the c and c++ compilers that are by potential of and massive usual by potential of default. Open a terminal and kind "information gcc" to ascertain -- that are meant to be the default documentation for it. it is a command line compiler, no longer an IDE like seen C++. you need to use GDB for debugging and stepping by potential of strategies and make for further complicated initiatives. On Ubuntu those are edge of the build-significant kit. yet once you're only reading c all you desire is gcc it is by potential of and massive usual by potential of default because of the fact the Linux kernel links to the glibc libraries.
2010-08-05 22:51:43 UTC
g++ is a great c++ compiler. It is to c++ what gcc is to c.


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