c++ - minGW CPP G++ Proper Command to Compile -
i installed following: mingw32_nt-6.1 i686 msys
i working command line. wrote "typical" helloworld.cpp program.
if compile with: cpp helloworld.cpp -o helloworld.exe compile good. (18k) execution fails: 16 bit ms-dos subsystem. ntvdm cpu error
if compile with: g++ helloworld.cpp -o helloworld.exe compile good. (48k) execution good.
i cannot determine best way execute compile , difference between methods. suggestions? or references? thanks.
"cpp" "c preprocessor", not compiler. you're getting strange in helloworld.exe
execute "type helloworld.exe" , see gives. shouldn't binary file - long text file "#includes" , "#defines" replaced.
to question - second way "right", because invoke compiler/linker , produce valid executable. first "way" valid command, has nothing compilation , linking.
Comments
Post a Comment