Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Unable to launch executable generated by Eclipse - error 193(Unable to Run/Debug program - Launch failed error 193 when creating process)
Unable to launch executable generated by Eclipse - error 193 [message #1109885] Mon, 16 September 2013 00:47 Go to next message
Huzefa Hakimi is currently offline Huzefa Hakimi
Messages: 2
Registered: September 2013
Junior Member
I am trying to compile and run simple c++ program using Eclipse with Cygwin as toolchain but I am running into issues (first try with Eclipse for C++). Help with the issue with the issue covered is appreciated.

Details:

Build of program goes fine but when I start program (named Project) in Debug (Run --> Debug) in debug mode or even run it (Run -->Run), I get error "'Launching Project.exe' has encountered a problem".

Details of error:
----
Error in final launch sequence
Failed to execute MI command:
-exec-run
Error message from debugger back end:
Error creating process /cygdrive/c/Users/Genius/workspace/Project/Debug/Project.exe, (error 193).
Error creating process /cygdrive/c/Users/Genius/workspace/Project/Debug/Project.exe, (error 193).
----

Could I be missing something in configuration?




Initially my workspace was on E:\ (E:\Users\Genius\workspace\) than C:\ - primary Windows partition on which Windows 7 is installed. This where I was initially seeing errors.

-----
Error in final launch sequence
Failed to execute MI command:
-exec-run
Error message from debugger back end:
Error creating process /cygdrive/e/Users/Genius/workspace/Project/Debug/Project.exe, (error 193).
Error creating process /cygdrive/e/Users/Genius/workspace/Project/Debug/Project.exe, (error 193).
------

While searching over this issue, I had came across posts in different forums stating Launch of program failed as it had issues with permissions and better to have workspace in primary partition (not sure why?). To square out that I copied over workspace contents to C:\ (C:\Users\Genius\workspace\) but that also did not help.


----
Error in final launch sequence
Failed to execute MI command:
-exec-run
Error message from debugger back end:
Error creating process /cygdrive/c/Users/Genius/workspace/Project/Debug/Project.exe, (error 193).
Error creating process /cygdrive/c/Users/Genius/workspace/Project/Debug/Project.exe, (error 193).
-------

There are no spaces in the path.

From cygwin prompt, I can compile, debug and run program fine. So I have feeling there could be some settings my project would be missing.

Installed package information in cygwin for C/C++ environment
--------
$ cygcheck.exe -c
Cygwin Package Information
Package Version Status
...
cccc 3.1.4-1 OK
cgdb 0.6.6-1 OK
coreutils 8.15-1 OK
cygutils 1.4.14-1 OK
cygwin 1.7.25-1 OK
...
gcc 4.7.3-1 OK
gcc-core 4.7.3-1 OK
gcc-g++ 4.7.3-1 OK
gdb 7.6.50-4 OK
...
make 3.82.90-1 OK
...
-----

Running program in gdb on cygwin prompt the one generated by cygwin runs fine:
-----
Genius@Genius-PC /cygdrive/e/Users/Genius/workspace/Project/src
$ gdb.exe a.exe
GNU gdb (GDB) 7.6.50.20130728-cvs (cygwin-special)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <gnu linked removed>
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-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<-- removed gnu link -->
Find the GDB manual and other documentation resources online at:
<-- edited: removed gnu link -->
For help, type "help".
Type "apropos word" to search for commands related to "word".
..
Reading symbols from /cygdrive/e/Users/Genius/workspace/Project/src/a.exe...done.
(gdb) start
Temporary breakpoint 1 at 0x4012dd
Starting program: /cygdrive/e/Users/Genius/workspace/Project/src/a.exe
[New Thread 6880.0xc40]
[New Thread 6880.0x2064]

Temporary breakpoint 1, 0x004012dd in main ()
(gdb) continue
Continuing.
#1 Move disk 2 from 1 to 3.
#1 Move disk 1 from 1 to 2.
#2 Move disk 1 from 1 to 2.
#2 Move disk 2 from 1 to 3.
#1 Move disk 1 from 2 to 3.
#2 Move disk 1 from 2 to 3.
[Inferior 1 (process 6880) exited normally]
-----

But when I try to load the executable in gdb generated by Eclipse, I see the same on cygwin also:


------
$ gdb.exe Project.exe
GNU gdb (GDB) 7.6.50.20130728-cvs (cygwin-special)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <link removed>
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-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<link removed>.
Find the GDB manual and other documentation resources online at:
<link removed>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
..
Reading symbols from /cygdrive/c/Users/Genius/workspace/Project/Debug/Project.exe...done.
(gdb) start
Temporary breakpoint 1 at 0x64b81258: file ../src/Project.cpp, line 33.
Starting program: /cygdrive/c/Users/Genius/workspace/Project/Debug/Project.exe
Error creating process /cygdrive/c/Users/Genius/workspace/Project/Debug/Project.exe, (error 193).
(gdb)
------
I have explicitly set path and symbols (PathAndSymbols.png) as well as Path Mapping (PathMapping.png) for Cywin in Eclipse. Files for same are attached with this post.

Help to resolve above is highly appreciated.

Thanks
Re: Unable to launch executable generated by Eclipse - error 193 [message #1110693 is a reply to message #1109885] Tue, 17 September 2013 03:38 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Error 193 means that Project.exe is not a valid executable. There seems something wrong with your compiler settings. In this thread http://stackoverflow.com/questions/2229247/gdb-fails-with-error-193-when-debugging-mingw-compiled-code a similar problem was reported. See second answer.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Unable to launch executable generated by Eclipse - error 193 [message #1111297 is a reply to message #1110693] Tue, 17 September 2013 23:19 Go to previous message
Huzefa Hakimi is currently offline Huzefa Hakimi
Messages: 2
Registered: September 2013
Junior Member
Axel Mueller wrote on Tue, 17 September 2013 03:38
Error 193 means that Project.exe is not a valid executable. There seems something wrong with your compiler settings. In this thread link removed a similar problem was reported. See second answer.



Thanks Axel, that did the trick, now atleast program starts in debugger. In addition I installed mingw-core and mingw-g++ packages available for cygwin.

Though the next issue I am running into is being not able to Debugger perspective is not able. When I run the program as Debug, it launches Debug perspective but than I see message "No source available for "ntdll!ZwReadFile() at 0x7786f905" and due to this breakpoints and stepping through code in Debugger perspective is not operational at present. Will try to look around for this issue. In case if you know how to resolve pls let me know.

Thnxs


Update: The above problem "No source available for "ntdll!ZwReadFile() at 0x7786f905" went away. Had to clean Debug Configuration. Deleted the earlier generated listing of Project.exe and performed clean build again and this time it went fine. Only issue was during exit, it seems its displaying the message as below. Not sure if that's an issue or not.


[Updated on: Tue, 17 September 2013 23:32]

Report message to a moderator

Previous Topic:NPE when attempting to compile C project
Next Topic:Binary Parser AIX XCOFF64
Goto Forum:
  


Current Time: Tue Jul 22 17:41:16 EDT 2014

Powered by FUDForum. Page generated in 0.01599 seconds