Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » [clean] Error 1
[clean] Error 1 [message #93538] Fri, 06 February 2004 16:06 Go to next message
Eclipse UserFriend
Originally posted by: ice_shack.hotmail.com

I managed to get the cdt 1.2.1 for Linux GTK installed and am going through
the tutotial in the c/c++ development users guide. I fixed all my other
errors when building and just have this last one I can't figure out "***
[clean] Error 1". If you can't tell, I am a newbie ( just started a c++
class 4 weeks ago).
Any help would be appreciated, Thanks.

Marty
Re: [clean] Error 1 [message #93567 is a reply to message #93538] Sat, 07 February 2004 10:12 Go to previous messageGo to next message
Eclipse UserFriend
I haven't looked at the tutorial, but I'd say it's somewhere in your
makefile in the 'clean' task.

Marty wrote:
> I managed to get the cdt 1.2.1 for Linux GTK installed and am going through
> the tutotial in the c/c++ development users guide. I fixed all my other
> errors when building and just have this last one I can't figure out "***
> [clean] Error 1". If you can't tell, I am a newbie ( just started a c++
> class 4 weeks ago).
> Any help would be appreciated, Thanks.
>
> Marty
>
>
Re: [clean] Error 1 [message #94642 is a reply to message #93567] Wed, 18 February 2004 14:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: d89-ahg.ludd.luth.se

Do you have a "main()" function in your code? /Anders H. www.addcore.com

"Matthijs Wensveen" <mrw@wanadoo.nl> wrote in message
news:c02v2h$b8s$1@eclipse.org...
> I haven't looked at the tutorial, but I'd say it's somewhere in your
> makefile in the 'clean' task.
>
> Marty wrote:
> > I managed to get the cdt 1.2.1 for Linux GTK installed and am going
through
> > the tutotial in the c/c++ development users guide. I fixed all my other
> > errors when building and just have this last one I can't figure out "***
> > [clean] Error 1". If you can't tell, I am a newbie ( just started a c++
> > class 4 weeks ago).
> > Any help would be appreciated, Thanks.
> >
> > Marty
> >
> >
Re: [clean] Error 1 [message #98941 is a reply to message #94642] Tue, 06 April 2004 22:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: macneil_pe.mercer.edu

Anders Hedberg wrote:
> Do you have a "main()" function in your code? /Anders H. www.addcore.com
>
> "Matthijs Wensveen" <mrw@wanadoo.nl> wrote in message
> news:c02v2h$b8s$1@eclipse.org...
>
>>I haven't looked at the tutorial, but I'd say it's somewhere in your
>>makefile in the 'clean' task.
>>
>>Marty wrote:
>>
>>>I managed to get the cdt 1.2.1 for Linux GTK installed and am going
>
> through
>
>>>the tutotial in the c/c++ development users guide. I fixed all my other
>>>errors when building and just have this last one I can't figure out "***
>>>[clean] Error 1". If you can't tell, I am a newbie ( just started a c++
>>>class 4 weeks ago).
>>>Any help would be appreciated, Thanks.
>>>
>>>Marty
>>>
>>>
>
>
>

I have exactly the same problem, and yes, I do have main() in the code.
I get no other errors, but I also have no executable.

I am looking for an IDE to replace one that needs replacing. This
example from the CDT tutorial seems not to work, in spite of
several hours spent trying different versions of Linux eclipse (GTK vs
Motif), etc. I am running the recommended combination (Eclipse 2.1.1
with CDT 1.2.1).

I can't put something like this into the hands of my students; it needs
to work as specified. I may soon have to cut my losses and look for
another IDE.

Paul
Re: [clean] Error 1 [message #99013 is a reply to message #98941] Wed, 07 April 2004 07:11 Go to previous messageGo to next message
Eclipse UserFriend
Hey guys,

before yelling here, look at the infos you provided.
The paste from the problems/task view is not enough, take the error
messages from the C-Build View.

I would guess, that you're makefiles clean rule looks like this:
--- SNIP ---
clean:
rm -rf helloworld helloworld.o
--- SNIP ---

First thing is, infront of rm must be a dash '-', though it looks like
the following:
--- SNIP ---
clean:
-rm -rf helloworld helloworld.o
--- SNIP ---

This will make ignore errors by executing rm-command, and the best
example for such an error is, when rm can not find the files to clean,
e.g. you build the first time and there is no helloworld.exe yet (since
you just try to build it).

Second thing is, that under Windows, executable files have an .exe
extension, which is mostly forgotten in most tutorials, even though they
claim to write the tutorial for windows users, they just copied from
somewhere else and did not read over their FAQ/tutorial again.

Though, your clean rule should look rather like this:
--- SNIP ---
clean:
-rm -rf helloworld.exe helloworld.o
--- SNIP ---

and your build rule like this:
--- SNIP ---
all:
$(MAKE) helloworld.exe

helloworld.exe: helloworld.o
$(CXX) -o $@ $^ $(LDFLAGS)

%.o: %.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $<
--- SNIP ---




Paul MacNeil wrote:
> Anders Hedberg wrote:
>
>> Do you have a "main()" function in your code? /Anders H. www.addcore.com
>>
>> "Matthijs Wensveen" <mrw@wanadoo.nl> wrote in message
>> news:c02v2h$b8s$1@eclipse.org...
>>
>>> I haven't looked at the tutorial, but I'd say it's somewhere in your
>>> makefile in the 'clean' task.
>>>
>>> Marty wrote:
>>>
>>>> I managed to get the cdt 1.2.1 for Linux GTK installed and am going
>>
>>
>> through
>>
>>>> the tutotial in the c/c++ development users guide. I fixed all my other
>>>> errors when building and just have this last one I can't figure out
>>>> "***
>>>> [clean] Error 1". If you can't tell, I am a newbie ( just started a c++
>>>> class 4 weeks ago).
>>>> Any help would be appreciated, Thanks.
>>>>
>>>> Marty
>>>>
>>>>
>>
>>
>>
>
> I have exactly the same problem, and yes, I do have main() in the code.
> I get no other errors, but I also have no executable.
>
> I am looking for an IDE to replace one that needs replacing. This
> example from the CDT tutorial seems not to work, in spite of
> several hours spent trying different versions of Linux eclipse (GTK vs
> Motif), etc. I am running the recommended combination (Eclipse 2.1.1
> with CDT 1.2.1).
>
> I can't put something like this into the hands of my students; it needs
> to work as specified. I may soon have to cut my losses and look for
> another IDE.
>
> Paul
Re: [clean] Error 1 [message #99088 is a reply to message #99013] Wed, 07 April 2004 12:44 Go to previous message
Eclipse UserFriend
Originally posted by: macneil_pe.mercer.edu

Thanks, I changed the makefile to the following:

>
> all: hello.exe
>
> clean:
> -rm main.o hello
>
> hello.exe: main.o
> g++ -g -o hello main.o
>
> main.o:
> g++ -c -g main.cpp
>

and it worked (on Red Hat 9, Eclipse 2.1.1 Linux-gtk, CDT 1.2.1).

Again, many thanks!

Paul

kesselhaus wrote:
> Hey guys,
>
> before yelling here, look at the infos you provided.
> The paste from the problems/task view is not enough, take the error
> messages from the C-Build View.
>
> I would guess, that you're makefiles clean rule looks like this:
> --- SNIP ---
> clean:
> rm -rf helloworld helloworld.o
> --- SNIP ---
>
> First thing is, infront of rm must be a dash '-', though it looks like
> the following:
> --- SNIP ---
> clean:
> -rm -rf helloworld helloworld.o
> --- SNIP ---
>
> This will make ignore errors by executing rm-command, and the best
> example for such an error is, when rm can not find the files to clean,
> e.g. you build the first time and there is no helloworld.exe yet (since
> you just try to build it).
>
> Second thing is, that under Windows, executable files have an .exe
> extension, which is mostly forgotten in most tutorials, even though they
> claim to write the tutorial for windows users, they just copied from
> somewhere else and did not read over their FAQ/tutorial again.
>
> Though, your clean rule should look rather like this:
> --- SNIP ---
> clean:
> -rm -rf helloworld.exe helloworld.o
> --- SNIP ---
>
> and your build rule like this:
> --- SNIP ---
> all:
> $(MAKE) helloworld.exe
>
> helloworld.exe: helloworld.o
> $(CXX) -o $@ $^ $(LDFLAGS)
>
> %.o: %.cpp
> $(CXX) $(CXXFLAGS) -o $@ -c $<
> --- SNIP ---
>
>
>
>
> Paul MacNeil wrote:
>
>> Anders Hedberg wrote:
>>
>>> Do you have a "main()" function in your code? /Anders H. www.addcore.com
>>>
>>> "Matthijs Wensveen" <mrw@wanadoo.nl> wrote in message
>>> news:c02v2h$b8s$1@eclipse.org...
>>>
>>>> I haven't looked at the tutorial, but I'd say it's somewhere in your
>>>> makefile in the 'clean' task.
>>>>
>>>> Marty wrote:
>>>>
>>>>> I managed to get the cdt 1.2.1 for Linux GTK installed and am going
>>>
>>>
>>>
>>> through
>>>
>>>>> the tutotial in the c/c++ development users guide. I fixed all my
>>>>> other
>>>>> errors when building and just have this last one I can't figure out
>>>>> "***
>>>>> [clean] Error 1". If you can't tell, I am a newbie ( just started a
>>>>> c++
>>>>> class 4 weeks ago).
>>>>> Any help would be appreciated, Thanks.
>>>>>
>>>>> Marty
>>>>>
>>>>>
>>>
>>>
>>>
>>
>> I have exactly the same problem, and yes, I do have main() in the
>> code. I get no other errors, but I also have no executable.
>>
>> I am looking for an IDE to replace one that needs replacing. This
>> example from the CDT tutorial seems not to work, in spite of
>> several hours spent trying different versions of Linux eclipse (GTK vs
>> Motif), etc. I am running the recommended combination (Eclipse 2.1.1
>> with CDT 1.2.1).
>>
>> I can't put something like this into the hands of my students; it
>> needs to work as specified. I may soon have to cut my losses and look
>> for another IDE.
>>
>> Paul
Previous Topic:adding toolchain specific GDB
Next Topic:Adding additional configurations
Goto Forum:
  


Current Time: Tue Jul 22 15:46:14 EDT 2025

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

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

Back to the top