From: Brendan Hansen Date: Tue, 24 Mar 2020 20:33:34 +0000 (-0500) Subject: Added -lm to c/c++ compilation X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=7fda6de4798ceb3b7dfb1067101de9e541f1a4fc;p=codebox.git Added -lm to c/c++ compilation --- diff --git a/executer/app/compilers/c_compiler.coffee b/executer/app/compilers/c_compiler.coffee index 64af19b..c5051ca 100644 --- a/executer/app/compilers/c_compiler.coffee +++ b/executer/app/compilers/c_compiler.coffee @@ -15,6 +15,7 @@ class CCompiler extends BaseCompiler source_file.file_path, './app/compilers/secure/seccomp.c', '-lseccomp', + '-lm', '-std=c11', '-o', exec_file.file_path diff --git a/executer/app/compilers/cpp_compiler.coffee b/executer/app/compilers/cpp_compiler.coffee index 8539b80..a33c529 100644 --- a/executer/app/compilers/cpp_compiler.coffee +++ b/executer/app/compilers/cpp_compiler.coffee @@ -15,6 +15,7 @@ class CPPCompiler extends BaseCompiler source_file.file_path, './app/compilers/secure/seccomp.c', '-lseccomp', + '-lm', '-std=c++14', '-o', exec_file.file_path