diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt index 89d8597cdf..e7dcede738 100644 --- a/Meta/Lagom/CMakeLists.txt +++ b/Meta/Lagom/CMakeLists.txt @@ -455,7 +455,7 @@ if (BUILD_LAGOM) add_executable(js_lagom ../../Userland/Utilities/js.cpp) set_target_properties(js_lagom PROPERTIES OUTPUT_NAME js) - target_link_libraries(js_lagom LagomJS LagomLine Threads::Threads) + target_link_libraries(js_lagom LagomJS LagomLine LagomMain Threads::Threads) add_executable(markdown-check_lagom ../../Userland/Utilities/markdown-check.cpp) set_target_properties(markdown-check_lagom PROPERTIES OUTPUT_NAME markdown-check) diff --git a/Userland/Utilities/CMakeLists.txt b/Userland/Utilities/CMakeLists.txt index 6849c9ff12..0d396932be 100644 --- a/Userland/Utilities/CMakeLists.txt +++ b/Userland/Utilities/CMakeLists.txt @@ -70,7 +70,7 @@ target_link_libraries(grep LibRegex) target_link_libraries(gunzip LibCompress) target_link_libraries(gzip LibCompress) target_link_libraries(id LibMain) -target_link_libraries(js LibJS LibLine) +target_link_libraries(js LibJS LibLine LibMain) target_link_libraries(keymap LibKeyboard) target_link_libraries(lspci LibPCIDB) target_link_libraries(lsusb LibUSBDB) diff --git a/Userland/Utilities/js.cpp b/Userland/Utilities/js.cpp index 29d57f2cfd..9844c2c454 100644 --- a/Userland/Utilities/js.cpp +++ b/Userland/Utilities/js.cpp @@ -60,6 +60,7 @@ #include #include #include +#include #include #include #include @@ -1102,7 +1103,7 @@ public: } }; -int main(int argc, char** argv) +ErrorOr serenity_main(Main::Arguments arguments) { bool gc_on_every_allocation = false; bool disable_syntax_highlight = false; @@ -1123,7 +1124,7 @@ int main(int argc, char** argv) #endif args_parser.add_option(disable_syntax_highlight, "Disable live syntax highlighting", "no-syntax-highlight", 's'); args_parser.add_positional_argument(script_paths, "Path to script files", "scripts", Core::ArgsParser::Required::No); - args_parser.parse(argc, argv); + args_parser.parse(arguments.argc, arguments.argv); bool syntax_highlight = !disable_syntax_highlight;