Description:
fixed c++ compilation bug (thanks to Witchakorn Kamolpornwijit)
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r119:01b9b35be113 - - 1 file changed: 4 inserted, 1 deleted

@@ -74,21 +74,24
74 74 open(params[:message_file],"w") do |f|
75 75 f.puts "ERROR: The source file did not exist."
76 76 end
77 77 exit(127)
78 78 end
79 79
80 + if params[:prog_lang]=='cpp':
81 + params[:prog_lang] = 'c++'
82 + end
83 +
80 84 # Compile.
81 85 case params[:prog_lang]
82 86
83 87 when "c"
84 88 command = "#{C_COMPILER} #{params[:source_file]} -o #{params[:output_file]} #{C_OPTIONS} 2> #{params[:message_file]}"
85 89 system(command)
86 90
87 91 when "c++"
88 - when "cpp"
89 92 command = "#{CPLUSPLUS_COMPILER} #{params[:source_file]} -o #{params[:output_file]} #{CPLUSPLUS_OPTIONS} 2> #{params[:message_file]}"
90 93 system(command)
91 94
92 95 when "pas"
93 96 command = "#{PASCAL_COMPILER} #{params[:source_file]} -ooutpas #{PASCAL_OPTIONS} > #{params[:message_file]}"
94 97 system(command)
You need to be logged in to leave comments. Login now