Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Help with the make process
Help with the make process [message #41449] Tue, 10 September 2002 02:21 Go to next message
Eclipse UserFriend
Originally posted by: rliu.netfyi.com

Hello,

I installed MinGW and follow the simple dirctions to make a Hello program
but can't seem to get it working. It keeps having problem make the
makefile. This the message in the "C-Build" (BTW, I'm unable to copy text
in the "C-Build", it would be nice it we can copy text):

========================
make -f makefile clean all
!CBuilder.build_error!
(CreateProcess: make -f makefile clean all error=2)
=========================

This is my makefile

=================================
objects = HelloWorldC.o

HelloWorldC : $(objects)
C:/MinGW/bin/gcc -o HelloWorldC $(objects) -L
C:/MinGW/lib/gcc-lib/MinGW32/3.2/ -lstdc++

$(objects) : HelloWorldC.cpp
C:/MinGW/bin/gcc -c HelloWorldC.cpp

all :
${MAKE} HelloWorldC

PHONY : clean
clean :
-del HelloWorldC.exe $(objects)
===============================

What I'm doing wrong?

Also, initially I had the MinGW in C:\Program Files\Eclipse\MinGW and the
long filename with space seem to cause problem. I had to use the quotes
like "C:\Program Files\...\MinGW\..."

Thanks!
Re: Help with the make process [message #41637 is a reply to message #41449] Wed, 11 September 2002 23:54 Go to previous messageGo to next message
Eclipse UserFriend
"Raymond Liu" <rliu@netfyi.com> wrote in message
news:alk318$f0a$1@rogue.oti.com...
> Hello,
>
> I installed MinGW and follow the simple dirctions to make a Hello program
> but can't seem to get it working. It keeps having problem make the
> makefile. This the message in the "C-Build" (BTW, I'm unable to copy text
> in the "C-Build", it would be nice it we can copy text):
>
> ========================
> make -f makefile clean all
> !CBuilder.build_error!
> (CreateProcess: make -f makefile clean all error=2)
> =========================
>
> This is my makefile
>
> =================================
> objects = HelloWorldC.o
>
> HelloWorldC : $(objects)
> C:/MinGW/bin/gcc -o HelloWorldC $(objects) -L
> C:/MinGW/lib/gcc-lib/MinGW32/3.2/ -lstdc++
>
> $(objects) : HelloWorldC.cpp
> C:/MinGW/bin/gcc -c HelloWorldC.cpp
>
> all :
> ${MAKE} HelloWorldC
>
> PHONY : clean
> clean :
> -del HelloWorldC.exe $(objects)
> ===============================
>
> What I'm doing wrong?

From the error above, it looks like the CDT is unable to spawn
make on the project. Are you able to run "make" from a
command.com on the project? You need at least make in
the path, or you'll need to manually edit the builder command
(in project->preferences) to specify the full path to make.

>
> Also, initially I had the MinGW in C:\Program Files\Eclipse\MinGW and the
> long filename with space seem to cause problem. I had to use the quotes
> like "C:\Program Files\...\MinGW\..."

That's a good hint. If you install MinGW in a directory with no spaces,
do things work better?

Sebastien
>
> Thanks!
>
>
Re: Help with the make process [message #41694 is a reply to message #41637] Thu, 12 September 2002 17:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rliu.netfyi.com

Sebastien Marineau wrote:

> "Raymond Liu" <rliu@netfyi.com> wrote in message
> news:alk318$f0a$1@rogue.oti.com...
> > Hello,
> >
> > I installed MinGW and follow the simple dirctions to make a Hello program
> > but can't seem to get it working. It keeps having problem make the
> > makefile. This the message in the "C-Build" (BTW, I'm unable to copy text
> > in the "C-Build", it would be nice it we can copy text):
> >
> > ========================
> > make -f makefile clean all
> > !CBuilder.build_error!
> > (CreateProcess: make -f makefile clean all error=2)
> > =========================
> >
> > This is my makefile
> >
> > =================================
> > objects = HelloWorldC.o
> >
> > HelloWorldC : $(objects)
> > C:/MinGW/bin/gcc -o HelloWorldC $(objects) -L
> > C:/MinGW/lib/gcc-lib/MinGW32/3.2/ -lstdc++
> >
> > $(objects) : HelloWorldC.cpp
> > C:/MinGW/bin/gcc -c HelloWorldC.cpp
> >
> > all :
> > ${MAKE} HelloWorldC
> >
> > PHONY : clean
> > clean :
> > -del HelloWorldC.exe $(objects)
> > ===============================
> >
> > What I'm doing wrong?

> From the error above, it looks like the CDT is unable to spawn
> make on the project. Are you able to run "make" from a
> command.com on the project? You need at least make in
> the path, or you'll need to manually edit the builder command
> (in project->preferences) to specify the full path to make.

> >
> > Also, initially I had the MinGW in C:\Program Files\Eclipse\MinGW and the
> > long filename with space seem to cause problem. I had to use the quotes
> > like "C:\Program Files\...\MinGW\..."

> That's a good hint. If you install MinGW in a directory with no spaces,
> do things work better?

> Sebastien
> >
> > Thanks!
> >
> >

Raymond Liu wrote:

This is where I'm a bit confuse. I can't seem to find "make.exe" or
"make.com" or "make.bat" in my file system. Is it part of MinGW install?
Or, part of CDT install? Or, am I missing another component?

I did move MinGW to the C:\ root so space should not be a factor any more.

Thanks!
Re: Help with the make process [message #41813 is a reply to message #41694] Fri, 13 September 2002 20:03 Go to previous messageGo to next message
Eclipse UserFriend
Raymond Liu wrote:

> This is where I'm a bit confuse. I can't seem to find "make.exe" or
> "make.com" or "make.bat" in my file system. Is it part of MinGW install?
> Or, part of CDT install? Or, am I missing another component?

> I did move MinGW to the C:\ root so space should not be a factor any more.

> Thanks!

The make program has a longer filename, then you expect!
It's <MinGW-PATH>\bin\mingw32-make.exe.
Why it's not given another shortname form like the other tools... don't
ask me.
But you can safely rename it to make.exe.

Henning
Re: Help with the make process [message #41839 is a reply to message #41813] Sat, 14 September 2002 11:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rliu.netfyi.com

Raymond wrote:

Thanks! That helped. I was able to manually type in on the command line
to complie the object and then the EXE. However, I'm still having problem
getting CDT to tell the make.exe (which I renamed) to make the EXE. I get
the following:

============================
make -f makefile clean all
makefile 4: *** missing separator. Stop.
============================

I think the problem is the example makefile that I got. I don't know a lot
about makefile syntax so I'm not sure what the problem is. Can someone
help? Here is the very simple makefile:

=============================
HelloWorldC2 : $(objects)
gcc -o HelloWorldC2 $(objects) -L C:/MinGW/lib/gcc-lib/mingw32/3.2/
-lstdc++

$(objects) : HelloWorldC2.c
gcc -c HelloWorldC2.c

all :
${MAKE} HelloWorldC2

PHONY : clean
clean :
-del HelloWorldC2.exe $(objects)
=============================

C-Build puts a red stop icon next to the "${MAKE} HelloWorldC2" line. What
am I doing wrong?

Finally, I can't see find a project setting for CDT for INCLUDE and LIB
and BIN path. Instead, I had to go to the Windows environment setting. Is
there one and I am just not looking in the right place?

Thanks!

Raymond Liu

Henning Riedel wrote:

> Raymond Liu wrote:

> > This is where I'm a bit confuse. I can't seem to find "make.exe" or
> > "make.com" or "make.bat" in my file system. Is it part of MinGW install?
> > Or, part of CDT install? Or, am I missing another component?

> > I did move MinGW to the C:\ root so space should not be a factor any more.

> > Thanks!

> The make program has a longer filename, then you expect!
> It's <MinGW-PATH>\bin\mingw32-make.exe.
> Why it's not given another shortname form like the other tools... don't
> ask me.
> But you can safely rename it to make.exe.

> Henning
Re: Help with the make process [message #41900 is a reply to message #41839] Sat, 14 September 2002 21:58 Go to previous message
Eclipse UserFriend
Originally posted by: cdm.qnx.com

Raymond Liu wrote:
> Raymond wrote:
>
> Thanks! That helped. I was able to manually type in on the command line
> to complie the object and then the EXE. However, I'm still having problem
> getting CDT to tell the make.exe (which I renamed) to make the EXE. I get
> the following:
>
> ============================
> make -f makefile clean all
> makefile 4: *** missing separator. Stop.
> ============================
>
> I think the problem is the example makefile that I got. I don't know a lot
> about makefile syntax so I'm not sure what the problem is. Can someone
> help? Here is the very simple makefile:
>

Generally that means you are missing a hard-tab on line 4. You need to
have a hard-tab before the action for a target.

all:
<HT>some action

If <HT> is a space or a series of spaces then it won't work right.

chris




--
Chris McKillop <cdm@qnx.com> "The faster I go, the behinder I get."
Software Engineer, QSSL -- Lewis Carroll --
http://qnx.wox.org/
Previous Topic:Open view through action
Next Topic:Extending CDT
Goto Forum:
  


Current Time: Tue Jul 15 02:39:55 EDT 2025

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

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

Back to the top