User forums > Nightly builds

The 07 July 2012 build (8086) is out.

<< < (5/7) > >>

sensey:
hello, I have a problem with codeblocks but I dont know if it's really a codeblocks fault or a compiler problem, I compiled drivers with gcc 3.16 but since I upgraded to 4.x throws me the following error:

gcc.exe: error: unrecognized option '--subsystem,native'

anyone know if it can be solved?

MortenMacFly:

--- Quote from: sensey on July 13, 2012, 03:27:04 am ---gcc.exe: error: unrecognized option '--subsystem,native'

anyone know if it can be solved?

--- End quote ---
Don't use that option with this compiler. The compiler does not recognise, a.k.a support the option. It is as simple as that.

sensey:

--- Quote from: MortenMacFly on July 13, 2012, 09:55:23 am ---Don't use that option with this compiler. The compiler does not recognise, a.k.a support the option. It is as simple as that.
--- End quote ---

but how to remove? it is auto added when you configure the target as native:


--- Quote ---mingw32-g++.exe  -o ..\driver.sys ..\driver.o   -s -nostartfiles -nostdlib -Wl,--entry,_DriverEntry@8 -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -Wl,--image-base,0x00010000 -Wl,--subsystem,native -def driver.def -s -static-libgcc -static-libstdc++  -lntoskrnl -lhal -lwin32k  --subsystem,native
--- End quote ---

this are the options of the project:


--- Quote ----s -nostartfiles -nostdlib -Wl,--entry,_DriverEntry@8 -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -Wl,--image-base,0x00010000 -Wl,--subsystem,native -def driver.def -s -static-libgcc -static-libstdc++  -lntoskrnl -lhal -lwin32k
--- End quote ---

and the last: "--subsystem,native" is added by codeblocks, I also try disable the linker policy ("use project options only"), but it is still added...

Alpha:
Does this patch fix it?

--- Code: ---Index: src/plugins/compilergcc/compilerMINGW.cpp
===================================================================
--- src/plugins/compilergcc/compilerMINGW.cpp (revision 8106)
+++ src/plugins/compilergcc/compilerMINGW.cpp (working copy)
@@ -178,7 +178,7 @@
     m_Commands[(int)ctLinkConsoleExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs")));
     if (platform::windows)
     {
-        m_Commands[(int)ctLinkNativeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs --subsystem,native")));
+        m_Commands[(int)ctLinkNativeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -Wl,--subsystem,native")));
         m_Commands[(int)ctLinkExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -mwindows")));
         m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
     }


--- End code ---

sensey:

--- Quote from: Alpha on July 13, 2012, 09:56:34 pm ---Does this patch fix it?

--- Code: ---Index: src/plugins/compilergcc/compilerMINGW.cpp
===================================================================
--- src/plugins/compilergcc/compilerMINGW.cpp (revision 8106)
+++ src/plugins/compilergcc/compilerMINGW.cpp (working copy)
@@ -178,7 +178,7 @@
     m_Commands[(int)ctLinkConsoleExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs")));
     if (platform::windows)
     {
-        m_Commands[(int)ctLinkNativeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs --subsystem,native")));
+        m_Commands[(int)ctLinkNativeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -Wl,--subsystem,native")));
         m_Commands[(int)ctLinkExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -mwindows")));
         m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
     }


--- End code ---

--- End quote ---

I did not try but it would be better if you can disable it by "linker policy"... (or if you can edit what is added to)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version