User forums > Using Code::Blocks

Trying to Run Hello World in Debug mode

<< < (3/4) > >>

Jenna:

--- Quote from: ollydbg on December 31, 2008, 03:17:35 am ---
--- Quote ---Error creating process C:\Documents and Settings\ED\Desktop\TEXT NOTES TEMP\C++ CodeBlocks\Hello World/bin/Debug/Hello World.exe, (error 193).
--- End quote ---

Your folder seems too long. Change it to a simple folder name with out "spaces".

--- End quote ---

I have tried it with exactly the same path (for project and executables) and the same gdb version on w2k and it works.

Ed997:

--- Quote from: jens on December 30, 2008, 10:16:37 pm ---Can you change "Settings -> Compiler and debugger... -> Global compiler Settings -> [the compiler you use for the project] -> Other settings (the rightmost tab) -> Compiler logging" to "Full commandline", do a rebuild  and post the build log ?

--- End quote ---

  Jens,

   Ok, I did exactly that, Build Log:

-------------- Build: Debug in Hello World1 ---------------

mingw32-g++.exe -Wall -fexceptions  -Wall -g  -Wall -g    -c "C:\Documents and Settings\ED\Desktop\TEXT NOTES TEMP\C++ CodeBlocks\Hello World1\main.cpp" -o obj\Debug\main.o
mingw32-g++.exe  -o "bin\Debug\Hello World1.exe" obj\Debug\main.o   
Output size is 595.10 KB
Process terminated with status 0 (0 minutes, 9 seconds)
0 errors, 0 warnings


Regards, Ed


Jenna:
The build log looks okay, except for the amount of "-Wall -g".

I have no clue what happens.

The only thing to test would be to use a a shorter path (if possible one that only contains standard-ascii characters without spaces) for new wizard-created project.

You don't need to change the wizards-settings for the console-application, unless you definitely need other options (that would avoid the multiple "-Wall -g").

Ed997:

--- Quote from: ollydbg on December 31, 2008, 03:17:35 am ---
--- Quote ---Error creating process C:\Documents and Settings\ED\Desktop\TEXT NOTES TEMP\C++ CodeBlocks\Hello World/bin/Debug/Hello World.exe, (error 193).
--- End quote ---

Your folder seems too long. Change it to a simple folder name with out "spaces".

--- End quote ---

Olldbg and Jens,

Ok, Wanting to Double Check all leads, I thought "though the 'Absolute Path filename' may have been OK on Jens computer setup. ....., maybe it is not on mine.

   Since I have run into file-lenght problems before in other editing/scripting.


   Made "New Project from scratch, adding in the same .cpp file.

I made my project as  "C:\0\HiWorld". [I do not believe (but will prove) the lack of spaces in the name is important].

   Once I constructed the project I :   Debug / Start.


========== Build Log ==========================
-------------- Build: Debug in HiWorld ---------------

mingw32-g++.exe -Wall -fexceptions  -g  -Wall -g    -c C:\0\HiWorld\HiWorld.cpp -o obj\Debug\HiWorld.o
mingw32-g++.exe  -o bin\Debug\HiWorld.exe obj\Debug\HiWorld.o   
Output size is 595.10 KB
Process terminated with status 0 (0 minutes, 2 seconds)
0 errors, 0 warnings
 
==========================================

=========== Debug Log ==============================
PATH=.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\WINDOWS;C:\Program Files\CodeBlocks\MinGW\bin;C:\borland\BCC55\bin\;C:\Borland\BCC55\Include\;C:\Borland\BCC55\Lib\;C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\;C:\Program Files\Microsoft Visual Studio 9.0\VC\bin;C:\WINDOWS\System32\Wbem\;C:\Program Files\QuickTime\QTSystem\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Common Files\GTK\2.0\bin;C:\PROGRA~1\XSoft;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\AutoIt3;C:\PROGRA~1\DISKEE~1\DISKEE~1\
Command-line: C:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname  -quiet -args bin/Debug/HiWorld.exe
Working dir : C:\0\HiWorld\
> set prompt >>>>>>cb_gdb:
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb 6.7.50.20071127
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set debugevents on
>>>>>>cb_gdb:
> set new-console on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> directory C:/0/HiWorld/
>>>>>>cb_gdb:
> run
gdb: win32_init_thread_list
Program exited normally.
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:
> quit

================================================

'################################################################## 
So far So Good, Next Experiment ......... New Project ............. Proving the spaces are OK:
'################################################################## 


I made my project as  "C:\0 0 0 0\Hi World New Project".  (same .cpp file)

   Once I constructed the project I :   Debug / Start.


========== Build Log ==========================
-------------- Build: Debug in Hi World New Project ---------------

mingw32-g++.exe -Wall -fexceptions  -g  -Wall -g    -c "C:\0 0 0 0\Hi World New Project\Hi World New Project.cpp" -o "obj\Debug\Hi World New Project.o"
mingw32-g++.exe  -o "bin\Debug\Hi World New Project.exe" "obj\Debug\Hi World New Project.o"   
Output size is 595.13 KB
Process terminated with status 0 (0 minutes, 2 seconds)
0 errors, 0 warnings
 
 
==========================================

=========== Debug Log ==============================
PATH=.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\WINDOWS;C:\Program Files\CodeBlocks\MinGW\bin;C:\borland\BCC55\bin\;C:\Borland\BCC55\Include\;C:\Borland\BCC55\Lib\;C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\;C:\Program Files\Microsoft Visual Studio 9.0\VC\bin;C:\WINDOWS\System32\Wbem\;C:\Program Files\QuickTime\QTSystem\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Common Files\GTK\2.0\bin;C:\PROGRA~1\XSoft;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\AutoIt3;C:\PROGRA~1\DISKEE~1\DISKEE~1\
Command-line: C:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname  -quiet -args "bin/Debug/Hi World New Project.exe"
Working dir : C:\0 0 0 0\Hi World New Project\
> set prompt >>>>>>cb_gdb:
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb 6.7.50.20071127
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set debugevents on
>>>>>>cb_gdb:
> set new-console on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> directory C:/0000~1/HIWORL~1/
>>>>>>cb_gdb:
> run
gdb: win32_init_thread_list
Program exited with code 030000000472.
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:
> quit

================================================

*******************************************************************
Summary:
For the moment it looks like my Absolute Path Filename was too long for my setup.
*******************************************************************

For now I think I am in great shape, to move foreward and learn.

Thank you guys very much for your quick feedback, ......and knowledgeable input.

Hopefully I can return the favor on some subject soon, for the forums.

Thanks again, and I am sure I will be bugging you soon maybe for some more legitimate problems !!!!
Regards, Ed

Ed997:

--- Quote from: jens on December 31, 2008, 06:49:19 pm ---The build log looks okay, except for the amount of "-Wall -g".

I have no clue what happens.

The only thing to test would be to use a a shorter path (if possible one that only contains standard-ascii characters without spaces) for new wizard-created project.

You don't need to change the wizards-settings for the console-application, unless you definitely need other options (that would avoid the multiple "-Wall -g").

--- End quote ---

   Jens,

You can access Compiler Flags for Debug, two ways I know of:

Right click the project in the management pane and choose Build

Options. Now on the Compiler Flags Tab you can set Debug and

Release Build choices separately.

Also you can use the Settings/Global Compiler settings -- Compiler

Flags Tab. Here you are setting the Debug and Release Build

choices Both at the same time.

=====================================
To eliminate doubling up on the flags .......

With "Settings/Global Compiler settings -- Compiler Flags Tab" I

left all boxes unchecked.

Then I made my flag choices with the:
"Right click the project in the management pane and choose Build

Options", then choosing Debug mode, then making my selections.

==================================
Then in the Build Log, I see only one -Wall and one -g switch.


Jens does this make sense to you?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version