User forums > Using Code::Blocks

Trying to Run Hello World in Debug mode

<< < (2/4) > >>

Jenna:
Ceniza means what he says: a path without "++" in it.

But I don't think that's the problem.

Error 193 means "ERROR_BAD_EXE_FORMAT".

Is it possible to run your exe from commandline ?
Start a console change directory to where the exe is and run it.
Try to run it with gdb also.

It would probably help if you turn on the debugger's debug log (goto "Settings -> Compiler and debugger... -> Debugger settings" and check "Display debuggers's log") and post it.

Do you have multiple gdb's on your system ?
You should use the MinGW-gdb with MinGW compiled code.

ollydbg:

--- Quote from: Ed997 on December 29, 2008, 06:20:20 pm ---11-06 am  12-29-08

   Hi,

   I checked out the .swf video. omg it is Soo small!, I cannot read the text and their is no audio to follow! I would like to see/understand your work !

  How could I get a larger copy!

  Thanks, Ed





--- End quote ---

Yes, you can't copy the test in swf. And I haven't record audio. There is no larger copy. :D

Ed997:
10-48 am  12-30-08

   Hi Jens,

   I neglected to mention that if I went to Hello World\bin\Debug\  .... I can double click the Hello World.exe file and it runs fine.

This confused me as according to CodeBlocks there was an error creating it.


==========================================================================
I ran for a debug build again after enabling the debugger log, here is what I got:

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/Hello World.exe"
Working dir : C:\Documents and Settings\ED\Desktop\TEXT NOTES TEMP\C++ CodeBlocks\Hello World\
> 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:/DOCUME~1/ED/Desktop/TEXTNO~1/C__COD~1/HELLOW~1/
>>>>>>cb_gdb:
> run
Error creating process C:\Documents and Settings\ED\Desktop\TEXT NOTES TEMP\C++ CodeBlocks\Hello World/bin/Debug/Hello World.exe, (error 193).
gdb: win32_init_thread_list
>>>>>>cb_gdb:


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

What do you think? I did a search in \Program Files\CodeBlocks\MinGW and there is only one gdb.exe in the "C:\Program Files\CodeBlocks\MinGW\bin" Folder.

Thanks in advance, Ed

Jenna:
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 ?

ollydbg:

--- 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".

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version