Skip to content

Commit

Permalink
Fix compilation on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Jatana committed Jul 21, 2018
1 parent ae1c933 commit 4d50b80
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Cpp_Intellij_Sense.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ def insert_error_marks(self):
file_dir_path = path.split(v.file_name())[0]
cmd = self.get_compile_cmd().format(source_file=run_file_path, source_file_dir=file_dir_path)
process = Popen(cmd, \
shell=True, stdin=PIPE, stdout=PIPE, stderr=subprocess.STDOUT, \
cwd=os.path.split(run_file_path)[0])
shell=True, stdin=PIPE, stdout=PIPE, stderr=subprocess.STDOUT)
# process.wait()
# s = process.stdout.read().decode()
s = process.communicate()[0].decode()
Expand Down
2 changes: 1 addition & 1 deletion FastOlympicCoding (Windows).sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
"name": "C++",
"extensions": ["cpp"],
"compile_cmd": "g++ \"{source_file}\" -std=gnu++11 -o {file_name}",
"compile_cmd": "g++ \"{file}\" -std=gnu++11 -o \"{file_name}\"",
"run_cmd": "\"{source_file_dir}\\{file_name}.exe\" {args} -debug",

"lint_compile_cmd": "g++ -std=gnu++11 \"{source_file}\" -I \"{source_file_dir}\""
Expand Down
2 changes: 2 additions & 0 deletions Modules/ProcessManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ def get_path(self, lst):
return rez

def format_command(self, cmd, args=''):
file = path.split(self.file)[1]
return cmd.format(
file=file,
source_file=self.file,
source_file_dir=path.dirname(self.file),
file_name=self.file_name,
Expand Down

0 comments on commit 4d50b80

Please sign in to comment.