Skip to content

Commit 3b65416

Browse files
committed
Fix bug bundle can not able to follow include files without extension #340
1 parent 889f218 commit 3b65416

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

onlinejudge_verify/languages/cplusplus_bundle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def _get_uncommented_code(path: pathlib.Path, *, iquotes_options: Tuple[str, ...
184184
if compiler == 'g++':
185185
raise BundleError(f'A fake g++ is detected. Please install the GNU C++ compiler.: {compiler}')
186186
raise BundleError(f"It's not g++. Please specify g++ with $CXX envvar.: {compiler}")
187-
command = [compiler, *iquotes_options, '-fpreprocessed', '-dD', '-E', str(path)]
187+
command = [compiler, '-x', 'c++', *iquotes_options, '-fpreprocessed', '-dD', '-E', str(path)]
188188
return subprocess.check_output(command)
189189

190190

0 commit comments

Comments
 (0)