From e354f5986f36577005e3d3ddfbd179894d911d76 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 30 Nov 2021 18:57:49 +0100 Subject: [PATCH] Base: Port cpp-basic template application to LibMain :^) --- Base/res/devel/templates/cpp-basic.postcreate | 2 +- Base/res/devel/templates/cpp-basic/main.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Base/res/devel/templates/cpp-basic.postcreate b/Base/res/devel/templates/cpp-basic.postcreate index caa7f94cc9..42f33c31cc 100644 --- a/Base/res/devel/templates/cpp-basic.postcreate +++ b/Base/res/devel/templates/cpp-basic.postcreate @@ -8,7 +8,7 @@ CXXFLAGS = -g -std=c++2a all: \$(PROGRAM) \$(PROGRAM): \$(OBJS) - \$(CXX) -o \$@ \$(OBJS) + \$(CXX) -o \$@ \$(OBJS) -lmain %.o: %.cpp \$(CXX) \$(CXXFLAGS) -o \$@ -c \$< diff --git a/Base/res/devel/templates/cpp-basic/main.cpp b/Base/res/devel/templates/cpp-basic/main.cpp index 42e70c767d..95efa135c0 100644 --- a/Base/res/devel/templates/cpp-basic/main.cpp +++ b/Base/res/devel/templates/cpp-basic/main.cpp @@ -1,6 +1,8 @@ #include +#include +#include -int main(int argc, char** argv) +ErrorOr serenity_main(Main::Arguments) { outln("Hello friends!"); return 0;