added more correct linker flags (patch by brezenbak)
[reactos.git] / reactos / tools / rbuild / backend / msvc / vcprojmaker.cpp
index c513b87..c3698f6 100644 (file)
@@ -330,8 +330,17 @@ MSVCBackend::_generate_vcproj ( const Module& module )
                        }\r
                        else if ( exe )\r
                        {\r
-                               fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", console ? 1 : 2 );\r
-                               fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", module.baseaddress.c_str ());  \r
+                               if ( module.type == Kernel || module.type == NativeCUI)\r
+                               {\r
+                                       fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /SUBSYSTEM:NATIVE /SECTION:INIT,D /ALIGN:4096 /FORCE:MULTIPLE\"\r\n" );\r
+                                       fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );\r
+                                       fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"%s\"\r\n", module.entrypoint.c_str ());\r
+                                       fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", module.baseaddress.c_str ());  \r
+                               }\r
+                               else if ( module.type == Win32CUI || module.type == Win32GUI )\r
+                               {\r
+                                       fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", console ? 1 : 2 );\r
+                               }\r
                        }\r
                        else if ( dll)\r
                        {\r