Author Topic: GUI console_runner?  (Read 11660 times)

Offline BiMode

  • Single posting newcomer
  • *
  • Posts: 6
    • http://
GUI console_runner?
« on: April 13, 2005, 04:09:25 am »
Hello,

The console_runner is built using -mwindows switch thus no pause of the loader.

Anonymous

  • Guest
GUI console_runner?
« Reply #1 on: May 04, 2005, 01:40:50 am »
Hello all,

I will try once again to explain a problem which I have been experimented. Hope my English will does the job well this time.

I created a console project using the wizard (latest CVS build). when building, at linking time, there will be a "-mwindows" flag is put into the commandline options. So every build will be "GUI" and you know console can't run with GUI subsystem flag.

Does anybody experimented like this?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
GUI console_runner?
« Reply #2 on: May 04, 2005, 01:51:11 am »
By "wizard" you mean templates?

Please check out your global compiler options (Compiler, Compiler options - or settings, plugins, compiler) and check if there's the infamous -mwindows flag. I checked the CVS source code via web (sourceforge), and couldn't find mwindows in the project files. Neither the templates, nor codeblocks.cbp. Also try resetting the compiler options and check if the problem persists. If it does, then it means it's a bug, and you should report at sourceforge.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
GUI console_runner?
« Reply #3 on: May 04, 2005, 08:21:32 am »
Unless you 've put the -mwindows flag somewhere yourself, Code::Blocks adds it in the linker's command line only for non-console projects.
First, verify that the build target's type is "Console" (in project properties).
Then, go to "Compile->Compiler options->Other->Advanced options->Commands" and check the commands for "Link object files to executable" (this should have the -mwindows flag) and "Link object files to console executable" (this shouldn't have it).

Yiannis.
Be patient!
This bug will be fixed soon...

Anonymous

  • Guest
GUI console_runner?
« Reply #4 on: May 05, 2005, 01:44:55 am »
Yes, from File->New Project.
I have checked it is console type (as it shows).

This is the value of "Link object files to console executable".
"$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs"

The commandline used to build.
"Project   : Console application
Compiler  : GNU GCC Compiler (using GNU "make")
Directory : C:\Documents and Settings\BiMode\Desktop\
--------------------------------------------------------------------------------
mingw32-g++.exe -MM   -MF .deps/main.d -MT .objs/main.o  -IC:/MinGW/include main.cpp
mingw32-g++.exe    -IC:/MinGW/include -c main.cpp -o .objs/main.o
mingw32-g++.exe  -LC:/MinGW/lib -o console.exe .objs/main.o        -mwindows
Process terminated with status 0 (0 minutes, 16 seconds)
0 errors, 0 warnings"

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
GUI console_runner?
« Reply #5 on: May 05, 2005, 08:21:54 am »
I 've grep'd for "mwindows" in the codeblocks source tree and it only comes up twice (as expected): inside a comment and inside the default link command for gui executables of the MinGW compiler.

Perhaps you 're using a custom Makefile?
Did you try building using direct-mode? Did it make a difference?

Yiannis.
Be patient!
This bug will be fixed soon...

Anonymous

  • Guest
GUI console_runner?
« Reply #6 on: May 06, 2005, 02:06:06 am »
Direct-mode works correctly. But in the Makefile mode I did use custom makefile (there is no makefile) nor a makefile is generated neither.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
GUI console_runner?
« Reply #7 on: May 06, 2005, 08:36:04 am »
Quote from: Anonymous
Direct-mode works correctly. But in the Makefile mode I did use custom makefile (there is no makefile) nor a makefile is generated neither.

If you check the custom makefile checkbox in project properties, the makefile won't be updated by C::B anymore, which means that you must make sure it is correct and up-to-date.
If you want C::B to auto-manage your Makefile, uncheck that checkbox.
In either case, if you want to export a current Makefile, go to "Compile->Export Makefile"

Yiannis.
Be patient!
This bug will be fixed soon...