User forums > Using Code::Blocks
Stopping Console from opening
(1/1)
Esanders323:
I have been following some SDL tutorials and want to get the console not to open.
I know if I got to Project Properites I can make just the GUI open. However, I don't have a project. Just single files. Is it possible to get the console not to open followed by the GUI/Windows Form and just have the GUI open?
Thanks
Alpha:
It is always preferable to have a project file, however, there is a hack that should achieve what you are trying to do:
Open Settings->Compiler and debugger...->Other settings (tab), click on Advanced options..., and select "Link object files to console executable" from the Command: drop-down menu. Change the text in the Command line macro: box from:
--- Code: ---$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs
--- End code ---
to:
--- Code: ---$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -mwindows
--- End code ---
(I am assuming you are working on a Windows computer.)
Please note again that this is not the suggested method (and will lead to unexpected behavior in other matters); you should add the files to a project. This will both provide access to the additional features of Code::Blocks (target-specific settings, debugging, etc.) and manage complicated multi-file builds (that you will have to use later in programming).
JackDawson:
--- Quote from: Esanders323 on December 03, 2011, 07:11:12 pm ---I have been following some SDL tutorials and want to get the console not to open.
I know if I got to Project Properites I can make just the GUI open. However, I don't have a project. Just single files. Is it possible to get the console not to open followed by the GUI/Windows Form and just have the GUI open?
Thanks
--- End quote ---
Keep in mind, the console opens only in Debug mode. Switch from Debug to Release and you will see that the Console does not open. Its just a simple switch setting. That's all it is. The reason FOR the console to be open is because any errors that comes up goes into that. So its for programming purposes. If you do not want it, then switch to Release and you will never see it. Hope that helps.
oBFusCATed:
JackDawson:
He is not using a project, so there is no debug or release mode. It is only one mode using the default compiler.
Also I'm not sure I understand all the things you said, nor that I think they are true. You can setup your project to open a console in both debug and release mode or any combination you like.
Navigation
[0] Message Index
Go to full version