diff --git a/gen/linker.cpp b/gen/linker.cpp index 3bf0e8f4..42688ad7 100644 --- a/gen/linker.cpp +++ b/gen/linker.cpp @@ -272,12 +272,14 @@ int linkObjToBinary(bool sharedLib) else output.append(libExt); } - args.push_back("-shared"); } else if (global.params.os == OSWindows && !endsWith(output, ".exe")) { output.append(".exe"); } } + if (sharedLib) + args.push_back("-shared"); + args.push_back("-o"); args.push_back(output.c_str());