Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Hello World: Exec error:Launching failed
Hello World: Exec error:Launching failed [message #81684] Thu, 02 October 2003 08:58 Go to next message
Eclipse UserFriend
Originally posted by: user.domain.invalid

Hi,

I've tried to read the Hello World problems in the newsgroup message,
but still can't resolve my problem.

I am using Eclipse 2.1.1 with CDT 1.1 and am unable to build my hello
world executable using eclipse. My C++ compiler is MinGW (under Build
Settings, the Build Command is set to "mingw32-make -f makefile").
If I build from the DOS command line, the program compiles fine, but
under Eclipse (Build Project), I get the error:
Build Error
(Exec error:Launching failed)

Here's my makefile:
============================================================ ======
objects = main.o

LIB_DIR = E:/MinGW/lib/gcc-lib/mingw32/3.2/
BIN_DIR = E:/MinGW/bin/

GCC = $(BIN_DIR)g++


COMPILE_OPTS = -g
CFLAGS = $(COMPILE_OPTS)
ALL_CFLAGS = -I. $(CFLAGS)

#COMPILE_OPTS = -Wno-deprecated

main : $(objects)
$(GCC) -o main $(objects) -lstdc++ $(CFLAGS)
# $(GCC) -o main $(objects) -L $(LIB_DIR) -lstdc++ $(CFLAGS)

$(objects) : main.cpp
$(GCC) -c main.cpp $(ALL_CFLAGS)
============================================================ ======

Any help would be greatly appreciated.

Trang
Re: Hello World: Exec error:Launching failed [message #82026 is a reply to message #81684] Fri, 03 October 2003 20:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alain.nowhere.com

user@domain.invalid wrote:

> Hi,

> I've tried to read the Hello World problems in the newsgroup message,
> but still can't resolve my problem.

> I am using Eclipse 2.1.1 with CDT 1.1 and am unable to build my hello
> world executable using eclipse. My C++ compiler is MinGW (under Build
> Settings, the Build Command is set to "mingw32-make -f makefile").
> If I build from the DOS command line, the program compiles fine, but
> under Eclipse (Build Project), I get the error:
> Build Error
> (Exec error:Launching failed)

Set your path so "mingw32-make" can be found and restart eclispse.

> Here's my makefile:
> ============================================================ ======
> objects = main.o

> LIB_DIR = E:/MinGW/lib/gcc-lib/mingw32/3.2/
> BIN_DIR = E:/MinGW/bin/

> GCC = $(BIN_DIR)g++


> COMPILE_OPTS = -g
> CFLAGS = $(COMPILE_OPTS)
> ALL_CFLAGS = -I. $(CFLAGS)

> #COMPILE_OPTS = -Wno-deprecated

> main : $(objects)
> $(GCC) -o main $(objects) -lstdc++ $(CFLAGS)
> # $(GCC) -o main $(objects) -L $(LIB_DIR) -lstdc++ $(CFLAGS)

> $(objects) : main.cpp
> $(GCC) -c main.cpp $(ALL_CFLAGS)
> ============================================================ ======

> Any help would be greatly appreciated.

> Trang
Re: Hello World: Exec error:Launching failed [message #82156 is a reply to message #81684] Mon, 06 October 2003 00:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: john.mlist.arrizza.com

<user@domain.invalid> wrote in message news:blh7af$pgv$1@eclipse.org...
> Hi,
>
> I've tried to read the Hello World problems in the newsgroup message,
> but still can't resolve my problem.
>
> I am using Eclipse 2.1.1 with CDT 1.1 and am unable to build my hello
> world executable using eclipse. My C++ compiler is MinGW (under Build
> Settings, the Build Command is set to "mingw32-make -f makefile").
> If I build from the DOS command line, the program compiles fine, but
> under Eclipse (Build Project), I get the error:
> Build Error
> (Exec error:Launching failed)

Got the same problem. mingw32-make is not in your PATH. Add the directory to
your PATH and restart eclipse.

Here's another twist that happened to me. I had the same problem, added the
path and got the same error. I finally traced it down to Windows Explorer. I
was starting up eclipse by double-clicking on ecplise.exe. When I killed
that Explorer, started up a new one and then double clicked on eclipse.exe,
everything worked fine. You may or may not get the same problem, depending
on a registry entry setting....

John



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.521 / Virus Database: 319 - Release Date: 9/23/2003
Re: Hello World: Exec error:Launching failed [message #82231 is a reply to message #82026] Mon, 06 October 2003 08:31 Go to previous message
Eclipse UserFriend
alain wrote:

> user@domain.invalid wrote:
>
>> Hi,
>
>> I've tried to read the Hello World problems in the newsgroup message,
>> but still can't resolve my problem.
>
>> I am using Eclipse 2.1.1 with CDT 1.1 and am unable to build my hello
>> world executable using eclipse. My C++ compiler is MinGW (under Build
>> Settings, the Build Command is set to "mingw32-make -f makefile").
>> If I build from the DOS command line, the program compiles fine, but
>> under Eclipse (Build Project), I get the error:
>> Build Error
>> (Exec error:Launching failed)
>
> Set your path so "mingw32-make" can be found and restart eclispse.
>
>> Here's my makefile:
>> ============================================================ ======
>> objects = main.o
>
>> LIB_DIR = E:/MinGW/lib/gcc-lib/mingw32/3.2/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
see below

>> BIN_DIR = E:/MinGW/bin/
>
>> GCC = $(BIN_DIR)g++
>
>
>> COMPILE_OPTS = -g
>> CFLAGS = $(COMPILE_OPTS)
>> ALL_CFLAGS = -I. $(CFLAGS)
>
>> #COMPILE_OPTS = -Wno-deprecated
>
>> main : $(objects)
>> $(GCC) -o main $(objects) -lstdc++ $(CFLAGS)
>> # $(GCC) -o main $(objects) -L $(LIB_DIR) -lstdc++ $(CFLAGS)
^^^^^^^^^^^^^^^^^^^^^^^^^
Someone needs to fix the FAQ/Tutorials examples.
For Windows, the executable extension is .exe.
There are predefined/(standard?!?) Macros for C/C++-Compiler.
CC for C-Compiler (gcc)
CXX for C++-Compiler (g++)
LD for the Linker (ld) if you want to use it explicitly, else use the
Compiler frontend (gcc/g++)
CFLAGS for C-Compiler Flags
CXXFLAGS for C++-Compiler Flags
LDFLAGS for Linker Flags (nevermind if using LD or not)

When using the right compiler you won't need to worry about the
libc/libstdc++ Library-Paths and the system include Paths, as long as you
don't use fancy libs i.e. for embedded targets. They are set by default.

If someone could fix this, then such makefiles wouldn't hurt newcomers. But
it does not mean to not reading the proper tool documentations though.

>> $(objects) : main.cpp
>> $(GCC) -c main.cpp $(ALL_CFLAGS)
>> ============================================================ ======
>
>> Any help would be greatly appreciated.
>
>> Trang
Previous Topic:folding in the editor?
Next Topic:No * or save enable on dirty editor
Goto Forum:
  


Current Time: Tue Jul 22 13:10:56 EDT 2025

Powered by FUDForum. Page generated in 0.03651 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top