+ 5

Can i compile a c++ program using the command prompt like in java without an ide?

26th Apr 2017, 1:31 AM
chris
chris - avatar
7 Respuestas
+ 13
Yes. If, for example you have the gnu compiler (and if you are in linux you may have it). what you have to do is: g++ sorce_file.cpp the executable will have the name 'a'
26th Apr 2017, 1:39 AM
Ulisses Cruz
Ulisses Cruz - avatar
+ 4
the question has been updated. can I run a c++ program using the command prompt without an ide ? please answer this question again since I updated it
26th Apr 2017, 1:44 AM
chris
chris - avatar
+ 4
@chris if you mean "run a c++ program without compiling it" the answer is No. It's only possible with interpreted languages. But if you are just asking about running compiled program (I don't think it's the case...) than it's easier with c++ than with java, 'cause you have executable file after compiling c++ code and you can just run it, and you have file with byte-code *.class after "compiling" java code (*.java) which must be run in JVM so you have to run java (jvm) and pass it your byte-code. But still you don't need an IDE to compile any c++ or java code, you just need a compiler javac (java compiler), gcc (gnu c compiler), c++ or other (there are some but not too many alternatives).
29th Apr 2017, 9:02 AM
Andrew Harchenko (Tomsk)
Andrew Harchenko (Tomsk) - avatar
+ 4
@Martin Taylor is the bcc32 the name of the compiler?
4th May 2017, 9:19 PM
chris
chris - avatar
+ 4
thanks martin you deserve to be mark as best answer
4th May 2017, 9:35 PM
chris
chris - avatar
+ 3
yes you can
26th Apr 2017, 1:38 AM
Welliton Malta
Welliton Malta - avatar
+ 2
Yes. The exact command line and available arguments depend on the compiler.
26th Apr 2017, 1:39 AM
Igor B
Igor B - avatar