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