From 9199beba6b33a83729a53792d71dcc00f70802f5 Mon Sep 17 00:00:00 2001 From: Ewan Croft Date: Thu, 9 Apr 2026 12:43:16 +0100 Subject: [PATCH] fix: add -lm flag for math.h functions Generated C code uses math.h functions (sin, cos, cast) but gcc was not linked with -lm, causing linker errors at runtime. --- selenium/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selenium/main.py b/selenium/main.py index c7e3491..b3e678b 100644 --- a/selenium/main.py +++ b/selenium/main.py @@ -67,7 +67,7 @@ def main(argv: list[str] | None = None) -> int: c_file.write_text(c_code, encoding="utf-8") try: result = subprocess.run( - [args.cc, str(c_file), "-o", str(exe_file)], + [args.cc, str(c_file), "-o", str(exe_file), "-lm"], capture_output=True, text=True, ) -- 2.51.2