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;