Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » How to use C/C++ Plugin with eclipse!
How to use C/C++ Plugin with eclipse! [message #53594] Tue, 10 December 2002 11:24 Go to next message
Eclipse UserFriend
Originally posted by: mdivljak.bluewin.ch

Hi!

I downloaded and instaled eclipse 2.0.2 and plugin for C/C++. After that,
I entziped the C/C++ - plugin in ..\eclipse\plugin. And, that's all.

I tried to make a C-Program and to compile it. But, hot to do it? Have I
to configure something specially, or, how to bind the C/C++ plugin for
writing and compiling C-Programs? I'm really confused.

Thanks for any help.
Re: How to use C/C++ Plugin with eclipse! [message #53624 is a reply to message #53594] Tue, 10 December 2002 14:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sevoy.rational.com

I will assume you have created a C/C++ project and have your compiler
environment properly set up. In order for Eclipse to build your project,
you need to supply a makefile in the root directory of your project (you
can modify the example below if you are not used to writing makefiles).

CC = g++
CCFLAGS = -g -c
LD = g++
LDFLAGS = -o
RM = rm -rf

OBJS = \
<someobjectfile>.o

all : <yourexename>

<yourexename> : ${OBJS}
${LD} ${LDFLAGS} $@ ${OBJS}

<someobjectfile>.o : <somesourcefile>.cc
${CC} ${CCFLAGS} $?

clean_all :
${RM} core ${OBJS} <yourexename>

Milutin wrote:
> Hi!
>
> I downloaded and instaled eclipse 2.0.2 and plugin for C/C++. After that,
> I entziped the C/C++ - plugin in ..\eclipse\plugin. And, that's all.
>
> I tried to make a C-Program and to compile it. But, hot to do it? Have I
> to configure something specially, or, how to bind the C/C++ plugin for
> writing and compiling C-Programs? I'm really confused.
>
> Thanks for any help.
>
Re: How to use C/C++ Plugin with eclipse! [message #53650 is a reply to message #53594] Tue, 10 December 2002 14:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: perlwhiz.yahoo.com

Milutin wrote:

> I downloaded and instaled eclipse 2.0.2 and plugin for C/C++. After that,
> I entziped the C/C++ - plugin in ..\eclipse\plugin.

I don't believe that you should unzip the plugin in the \plugins
directory. I think it should be unzipped from the main \eclipse directory.
This will correctly unzip the C++ plugin files in the proper
subdirectories (\plugins, \features, etc.).

Dave
Re: How to use C/C++ Plugin with eclipse! [message #53675 is a reply to message #53650] Tue, 10 December 2002 17:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mdivljak.bluewin.ch

Dave wrote:

> Milutin wrote:

> > I downloaded and instaled eclipse 2.0.2 and plugin for C/C++. After that,
> > I entziped the C/C++ - plugin in ..\\eclipse\\plugin.

> I don\'t believe that you should unzip the plugin in the \\plugins
> directory. I think it should be unzipped from the main \\eclipse directory.
> This will correctly unzip the C++ plugin files in the proper
> subdirectories (\\plugins, \\features, etc.).

> Dave

Thanks Dave. You\'re right. After I unzipped C/C++ plugin as you
described, I had C/C++ plugin \"integrated\" in the eclipse.

Menu Thanks.
Re: How to use C/C++ Plugin with eclipse! [message #53697 is a reply to message #53624] Tue, 10 December 2002 18:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mdivljak.bluewin.ch

Thanks for your answer. But, suppose, I have a lot of small projects. Have
I reali to supplay a makefile for every project, or is there a possibility
to configur the environment so, that I can avoid makefile?

I tried following example:

// ========== Code-Example ==========
#include <stdio.h>

void main()
{
printf("\nHallo World!\n\n");
}
// =====End of code example =========

If I try to Bild my project, I become following message:

make -k clean all
Build Error
(Exec error:Launching failed)

What is the meaning of this message und what do I wrong?

Thanks.

Sean Evoy wrote:

> I will assume you have created a C/C++ project and have your compiler
> environment properly set up. In order for Eclipse to build your project,
> you need to supply a makefile in the root directory of your project (you
> can modify the example below if you are not used to writing makefiles).

> CC = g++
> CCFLAGS = -g -c
> LD = g++
> LDFLAGS = -o
> RM = rm -rf

> OBJS = \
> <someobjectfile>.o

> all : <yourexename>

> <yourexename> : ${OBJS}
> ${LD} ${LDFLAGS} $@ ${OBJS}

> <someobjectfile>.o : <somesourcefile>.cc
> ${CC} ${CCFLAGS} $?

> clean_all :
> ${RM} core ${OBJS} <yourexename>

> Milutin wrote:
> > Hi!
> >
> > I downloaded and instaled eclipse 2.0.2 and plugin for C/C++. After that,
> > I entziped the C/C++ - plugin in ..\eclipse\plugin. And, that's all.
> >
> > I tried to make a C-Program and to compile it. But, hot to do it? Have I
> > to configure something specially, or, how to bind the C/C++ plugin for
> > writing and compiling C-Programs? I'm really confused.
> >
> > Thanks for any help.
> >
Re: How to use C/C++ Plugin with eclipse! [message #53753 is a reply to message #53697] Wed, 11 December 2002 10:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nospam_sevoy.rational.com

The short answer is that the basic builder in CDT uses makefiles, so no,
you cannot avoid using a makefile. However, you can build all your
targets using a single makefile. There is a previous thread that
describes how to do this. I don't know exactly what the error message
means (I am new to the product too), but if I had to guess, I would say
that the builder could not launch make. Can you manually invoke make
from a command prompt/xterm? If not, fix your path and try again.


Milutin wrote:
> Thanks for your answer. But, suppose, I have a lot of small projects. Have
> I reali to supplay a makefile for every project, or is there a possibility
> to configur the environment so, that I can avoid makefile?
>
> I tried following example:
>
> // ========== Code-Example ==========
> #include <stdio.h>
>
> void main()
> {
> printf("\nHallo World!\n\n");
> }
> // =====End of code example =========
>
> If I try to Bild my project, I become following message:
>
> make -k clean all
> Build Error
> (Exec error:Launching failed)
>
> What is the meaning of this message und what do I wrong?
>
> Thanks.
>
> Sean Evoy wrote:
>
>
>>I will assume you have created a C/C++ project and have your compiler
>>environment properly set up. In order for Eclipse to build your project,
>>you need to supply a makefile in the root directory of your project (you
>>can modify the example below if you are not used to writing makefiles).
>
>
>>CC = g++
>>CCFLAGS = -g -c
>>LD = g++
>>LDFLAGS = -o
>>RM = rm -rf
>
>
>>OBJS = \
>> <someobjectfile>.o
>
>
>>all : <yourexename>
>
>
>><yourexename> : ${OBJS}
>> ${LD} ${LDFLAGS} $@ ${OBJS}
>
>
>><someobjectfile>.o : <somesourcefile>.cc
>> ${CC} ${CCFLAGS} $?
>
>
>>clean_all :
>> ${RM} core ${OBJS} <yourexename>
>
>
>>Milutin wrote:
>>
>>>Hi!
>>>
>>>I downloaded and instaled eclipse 2.0.2 and plugin for C/C++. After that,
>>>I entziped the C/C++ - plugin in ..\eclipse\plugin. And, that's all.
>>>
>>>I tried to make a C-Program and to compile it. But, hot to do it? Have I
>>>to configure something specially, or, how to bind the C/C++ plugin for
>>>writing and compiling C-Programs? I'm really confused.
>>>
>>>Thanks for any help.
>>>
>>
>
>
>
>
Re: How to use C/C++ Plugin with eclipse! [message #53779 is a reply to message #53753] Thu, 12 December 2002 01:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mdivljak.bluewin.ch

You wrote the following:

> I will assume you have created a C/C++ project and have your compiler
environment properly set up.

I'm not sure, what do you mean with "have your compiler environment
properly set up"? I thought, the compiler is in the plugin and I don't
have to do anything special for using compiler? Am I wrong? Have I to "set
up" the compiler, and if yes, how to do it? Because, I didn't nothing
specal after "installing" of plugin! And what about API? Is there
something like that I can use (e.g. mark the printf-statement and press
F1)?

Thanks a lot.

Sean Evoy wrote:

> The short answer is that the basic builder in CDT uses makefiles, so no,
> you cannot avoid using a makefile. However, you can build all your
> targets using a single makefile. There is a previous thread that
> describes how to do this. I don't know exactly what the error message
> means (I am new to the product too), but if I had to guess, I would say
> that the builder could not launch make. Can you manually invoke make
> from a command prompt/xterm? If not, fix your path and try again.


> Milutin wrote:
> > Thanks for your answer. But, suppose, I have a lot of small projects. Have
> > I reali to supplay a makefile for every project, or is there a possibility
> > to configur the environment so, that I can avoid makefile?
> >
> > I tried following example:
> >
> > // ========== Code-Example ==========
> > #include <stdio.h>
> >
> > void main()
> > {
> > printf("\nHallo World!\n\n");
> > }
> > // =====End of code example =========
> >
> > If I try to Bild my project, I become following message:
> >
> > make -k clean all
> > Build Error
> > (Exec error:Launching failed)
> >
> > What is the meaning of this message und what do I wrong?
> >
> > Thanks.
> >
> > Sean Evoy wrote:
> >
> >
> >>I will assume you have created a C/C++ project and have your compiler
> >>environment properly set up. In order for Eclipse to build your project,
> >>you need to supply a makefile in the root directory of your project (you
> >>can modify the example below if you are not used to writing makefiles).
> >
> >
> >>CC = g++
> >>CCFLAGS = -g -c
> >>LD = g++
> >>LDFLAGS = -o
> >>RM = rm -rf
> >
> >
> >>OBJS = \
> >> <someobjectfile>.o
> >
> >
> >>all : <yourexename>
> >
> >
> >><yourexename> : ${OBJS}
> >> ${LD} ${LDFLAGS} $@ ${OBJS}
> >
> >
> >><someobjectfile>.o : <somesourcefile>.cc
> >> ${CC} ${CCFLAGS} $?
> >
> >
> >>clean_all :
> >> ${RM} core ${OBJS} <yourexename>
> >
> >
> >>Milutin wrote:
> >>
> >>>Hi!
> >>>
> >>>I downloaded and instaled eclipse 2.0.2 and plugin for C/C++. After that,
> >>>I entziped the C/C++ - plugin in ..\eclipse\plugin. And, that's all.
> >>>
> >>>I tried to make a C-Program and to compile it. But, hot to do it? Have I
> >>>to configure something specially, or, how to bind the C/C++ plugin for
> >>>writing and compiling C-Programs? I'm really confused.
> >>>
> >>>Thanks for any help.
> >>>
> >>
> >
> >
> >
> >
Re: How to use C/C++ Plugin with eclipse! [message #53804 is a reply to message #53779] Thu, 12 December 2002 09:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nospam_sevoy.rational.com

There is no compiler supplied with the CDT. It is assumed you have a
compiler (and related utilities) already installed. You need to have a
make utility and compiler installed on your system, and both have to be
found in the path. I don't know what OS you are using, but if you are on
Windows, you can get a gnu compiler, debugger, and make utility by
installing Cygwin (http://www.cygwin.com/) on your system.

Milutin wrote:
> You wrote the following:
>
>
>>I will assume you have created a C/C++ project and have your compiler
>
> environment properly set up.
>
> I'm not sure, what do you mean with "have your compiler environment
> properly set up"? I thought, the compiler is in the plugin and I don't
> have to do anything special for using compiler? Am I wrong? Have I to "set
> up" the compiler, and if yes, how to do it? Because, I didn't nothing
> specal after "installing" of plugin! And what about API? Is there
> something like that I can use (e.g. mark the printf-statement and press
> F1)?
>
> Thanks a lot.
>
> Sean Evoy wrote:
>
>
>>The short answer is that the basic builder in CDT uses makefiles, so no,
>>you cannot avoid using a makefile. However, you can build all your
>>targets using a single makefile. There is a previous thread that
>>describes how to do this. I don't know exactly what the error message
>>means (I am new to the product too), but if I had to guess, I would say
>>that the builder could not launch make. Can you manually invoke make
>>from a command prompt/xterm? If not, fix your path and try again.
>
>
>
>>Milutin wrote:
>>
>>>Thanks for your answer. But, suppose, I have a lot of small projects. Have
>>>I reali to supplay a makefile for every project, or is there a possibility
>>>to configur the environment so, that I can avoid makefile?
>>>
>>>I tried following example:
>>>
>>>// ========== Code-Example ==========
>>>#include <stdio.h>
>>>
>>>void main()
>>>{
>>> printf("\nHallo World!\n\n");
>>>}
>>>// =====End of code example =========
>>>
>>>If I try to Bild my project, I become following message:
>>>
>>>make -k clean all
>>>Build Error
>>>(Exec error:Launching failed)
>>>
>>>What is the meaning of this message und what do I wrong?
>>>
>>>Thanks.
>>>
>>>Sean Evoy wrote:
>>>
>>>
>>>
>>>>I will assume you have created a C/C++ project and have your compiler
>>>>environment properly set up. In order for Eclipse to build your project,
>>>>you need to supply a makefile in the root directory of your project (you
>>>>can modify the example below if you are not used to writing makefiles).
>>>
>>>
>>>>CC = g++
>>>>CCFLAGS = -g -c
>>>>LD = g++
>>>>LDFLAGS = -o
>>>>RM = rm -rf
>>>
>>>
>>>>OBJS = \
>>>> <someobjectfile>.o
>>>
>>>
>>>>all : <yourexename>
>>>
>>>
>>>><yourexename> : ${OBJS}
>>>> ${LD} ${LDFLAGS} $@ ${OBJS}
>>>
>>>
>>>><someobjectfile>.o : <somesourcefile>.cc
>>>> ${CC} ${CCFLAGS} $?
>>>
>>>
>>>>clean_all :
>>>> ${RM} core ${OBJS} <yourexename>
>>>
>>>
>>>>Milutin wrote:
>>>>
>>>>
>>>>>Hi!
>>>>>
>>>>>I downloaded and instaled eclipse 2.0.2 and plugin for C/C++. After that,
>>>>>I entziped the C/C++ - plugin in ..\eclipse\plugin. And, that's all.
>>>>>
>>>>>I tried to make a C-Program and to compile it. But, hot to do it? Have I
>>>>>to configure something specially, or, how to bind the C/C++ plugin for
>>>>>writing and compiling C-Programs? I'm really confused.
>>>>>
>>>>>Thanks for any help.
>>>>>
>>>>
>>>
>>>
>>>
>
>
>
>
Re: How to use C/C++ Plugin with eclipse! [message #54043 is a reply to message #53804] Thu, 12 December 2002 17:15 Go to previous messageGo to next message
Eclipse UserFriend
"Sean Evoy" <nospam_sevoy@rational.com> wrote in message
news:3DF8A357.1000606@rational.com...
| There is no compiler supplied with the CDT. It is assumed you have a
| compiler (and related utilities) already installed. You need to have a
| make utility and compiler installed on your system, and both have to be
| found in the path. I don't know what OS you are using, but if you are on
| Windows, you can get a gnu compiler, debugger, and make utility by
| installing Cygwin (http://www.cygwin.com/) on your system.
|


You might want to follow the instructions in the CDT Users Guide ;)

http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/cdt- home/user/faq.ht
ml?cvsroot=Tools_Project

It has instructions including cygwin.

-Judy

--
Re: How to use C/C++ Plugin with eclipse! [message #54193 is a reply to message #53779] Thu, 12 December 2002 08:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ijmuiden.pointbreak.biz

This is all (more or less) explained in the FAQ:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/cdt- home/user/faq.ht
ml?cvsroot=Tools_Project#build (no the plugin does not contain compilers and
debuggers, you have to install those seperately. You can use e.g. the open
source projects "mingw" or "cygwin" to get all necessry build tools).

"Milutin" <mdivljak@bluewin.ch> schreef in bericht
news:at9bth$v75$1@rogue.oti.com...
> You wrote the following:
>
> > I will assume you have created a C/C++ project and have your compiler
> environment properly set up.
>
> I'm not sure, what do you mean with "have your compiler environment
> properly set up"? I thought, the compiler is in the plugin and I don't
> have to do anything special for using compiler? Am I wrong? Have I to "set
> up" the compiler, and if yes, how to do it? Because, I didn't nothing
> specal after "installing" of plugin! And what about API? Is there
> something like that I can use (e.g. mark the printf-statement and press
> F1)?
>
> Thanks a lot.
>
> Sean Evoy wrote:
>
> > The short answer is that the basic builder in CDT uses makefiles, so no,
> > you cannot avoid using a makefile. However, you can build all your
> > targets using a single makefile. There is a previous thread that
> > describes how to do this. I don't know exactly what the error message
> > means (I am new to the product too), but if I had to guess, I would say
> > that the builder could not launch make. Can you manually invoke make
> > from a command prompt/xterm? If not, fix your path and try again.
>
>
> > Milutin wrote:
> > > Thanks for your answer. But, suppose, I have a lot of small projects.
Have
> > > I reali to supplay a makefile for every project, or is there a
possibility
> > > to configur the environment so, that I can avoid makefile?
> > >
> > > I tried following example:
> > >
> > > // ========== Code-Example ==========
> > > #include <stdio.h>
> > >
> > > void main()
> > > {
> > > printf("\nHallo World!\n\n");
> > > }
> > > // =====End of code example =========
> > >
> > > If I try to Bild my project, I become following message:
> > >
> > > make -k clean all
> > > Build Error
> > > (Exec error:Launching failed)
> > >
> > > What is the meaning of this message und what do I wrong?
> > >
> > > Thanks.
> > >
> > > Sean Evoy wrote:
> > >
> > >
> > >>I will assume you have created a C/C++ project and have your compiler
> > >>environment properly set up. In order for Eclipse to build your
project,
> > >>you need to supply a makefile in the root directory of your project
(you
> > >>can modify the example below if you are not used to writing
makefiles).
> > >
> > >
> > >>CC = g++
> > >>CCFLAGS = -g -c
> > >>LD = g++
> > >>LDFLAGS = -o
> > >>RM = rm -rf
> > >
> > >
> > >>OBJS = \
> > >> <someobjectfile>.o
> > >
> > >
> > >>all : <yourexename>
> > >
> > >
> > >><yourexename> : ${OBJS}
> > >> ${LD} ${LDFLAGS} $@ ${OBJS}
> > >
> > >
> > >><someobjectfile>.o : <somesourcefile>.cc
> > >> ${CC} ${CCFLAGS} $?
> > >
> > >
> > >>clean_all :
> > >> ${RM} core ${OBJS} <yourexename>
> > >
> > >
> > >>Milutin wrote:
> > >>
> > >>>Hi!
> > >>>
> > >>>I downloaded and instaled eclipse 2.0.2 and plugin for C/C++. After
that,
> > >>>I entziped the C/C++ - plugin in ..\eclipse\plugin. And, that's all.
> > >>>
> > >>>I tried to make a C-Program and to compile it. But, hot to do it?
Have I
> > >>>to configure something specially, or, how to bind the C/C++ plugin
for
> > >>>writing and compiling C-Programs? I'm really confused.
> > >>>
> > >>>Thanks for any help.
> > >>>
> > >>
> > >
> > >
> > >
> > >
>
>
>
>
Re: How to use C/C++ Plugin with eclipse! [message #54510 is a reply to message #54043] Tue, 17 December 2002 09:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ottomixa.email.cz

Dear all,
I've got the same problem. I've got installed cygwin, and I have set windows
environments: PATH=c:\cygwin\bin and MAKE= c:\cygwin\bin\make.exe .
Should be in Win env. some other settings? I'm sorry but mentioned Guide is
not quite good.
I was try it with creating makefile and still the same error.(of course that
I was unchecked the default make in preferences as it is in guide)
Also I was try by the normal way:
right click to preject->add make target; make->hello.exe, and error is :
make -k hello.exe

Build Error

(Exec error:Launching failed)

->Rebuild and the same error.

Please where is the mistake. thanks a lot

Otto





"Judy N. Green" <jgreen@qnx.com> wrote in message
news:atb0un$uim$1@rogue.oti.com...
>
> "Sean Evoy" <nospam_sevoy@rational.com> wrote in message
> news:3DF8A357.1000606@rational.com...
> | There is no compiler supplied with the CDT. It is assumed you have a
> | compiler (and related utilities) already installed. You need to have a
> | make utility and compiler installed on your system, and both have to be
> | found in the path. I don't know what OS you are using, but if you are on
> | Windows, you can get a gnu compiler, debugger, and make utility by
> | installing Cygwin (http://www.cygwin.com/) on your system.
> |
>
>
> You might want to follow the instructions in the CDT Users Guide ;)
>
>
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/cdt- home/user/faq.ht
> ml?cvsroot=Tools_Project
>
> It has instructions including cygwin.
>
> -Judy
>
> --
>
Re: How to use C/C++ Plugin with eclipse! [message #54537 is a reply to message #54043] Tue, 17 December 2002 10:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ottomixa.email.cz

Hi,
I'm sorry, I already have got it. I wrote the whole make path to build
option.
But I still don't know if c/c++ plugin is able to generate "Makefile" if not
what is the function of add target?
Thanks a lot.

Otto

"Judy N. Green" <jgreen@qnx.com> wrote in message
news:atb0un$uim$1@rogue.oti.com...
>
> "Sean Evoy" <nospam_sevoy@rational.com> wrote in message
> news:3DF8A357.1000606@rational.com...
> | There is no compiler supplied with the CDT. It is assumed you have a
> | compiler (and related utilities) already installed. You need to have a
> | make utility and compiler installed on your system, and both have to be
> | found in the path. I don't know what OS you are using, but if you are on
> | Windows, you can get a gnu compiler, debugger, and make utility by
> | installing Cygwin (http://www.cygwin.com/) on your system.
> |
>
>
> You might want to follow the instructions in the CDT Users Guide ;)
>
>
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/cdt- home/user/faq.ht
> ml?cvsroot=Tools_Project
>
> It has instructions including cygwin.
>
> -Judy
>
> --
>
Re: How to use C/C++ Plugin with eclipse! [message #54917 is a reply to message #54510] Thu, 19 December 2002 19:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: roman.levandovsky.guest-tek.com

I have a simillar problem, however the make utility dies quietly.
If I try to build the hello.cpp file and I do not have the make file, there is no errors telling me that makefile was not found or that the make command does not exist.

I have installed cygwin and MinGW both and still there are no errors but I do not get hello.exe or hello.o
I followed the example in the user guide to a tee and still no luck.

I am runing windows 98 eclipse 2.0.2 and cdt 1.0.1, is this a know bug? Are there any resolutions to this problem?

Roman.

On Tue, 17 Dec 2002 15:59:01 +0100, "otto mixa" <ottomixa@email.cz> wrote:
> Dear all,
> I've got the same problem. I've got installed cygwin, and I have set windows
> environments: PATH=c:\cygwin\bin and MAKE= c:\cygwin\bin\make.exe .
> Should be in Win env. some other settings? I'm sorry but mentioned Guide is
> not quite good.
> I was try it with creating makefile and still the same error.(of course that
> I was unchecked the default make in preferences as it is in guide)
> Also I was try by the normal way:
> right click to preject->add make target; make->hello.exe, and error is :
> make -k hello.exe
>
> Build Error
>
> (Exec error:Launching failed)
>
> ->Rebuild and the same error.
>
> Please where is the mistake. thanks a lot
>
> Otto
>
>
>
>
>
> "Judy N. Green" <jgreen@qnx.com> wrote in message
> news:atb0un$uim$1@rogue.oti.com...
> >
> > "Sean Evoy" <nospam_sevoy@rational.com> wrote in message
> > news:3DF8A357.1000606@rational.com...
> > | There is no compiler supplied with the CDT. It is assumed you have a
> > | compiler (and related utilities) already installed. You need to have a
> > | make utility and compiler installed on your system, and both have to be
> > | found in the path. I don't know what OS you are using, but if you are on
> > | Windows, you can get a gnu compiler, debugger, and make utility by
> > | installing Cygwin (http://www.cygwin.com/) on your system.
> > |
> >
> >
> > You might want to follow the instructions in the CDT Users Guide ;)
> >
> >
> http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/cdt- home/user/faq.ht
> > ml?cvsroot=Tools_Project
> >
> > It has instructions including cygwin.
> >
> > -Judy
> >
> > --
> > ¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨ ¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨¨¨
> > Judy N. Green Software Engineer
> > QNX Software Systems Ltd. www.qnx.com
> > ¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨ ¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨¨¨
> >
> > | Milutin wrote:
> > | > You wrote the following:
> > | >
> > | >
> > | >>I will assume you have created a C/C++ project and have your compiler
> > | >
> > | > environment properly set up.
> > | >
> > | > I'm not sure, what do you mean with "have your compiler environment
> > | > properly set up"? I thought, the compiler is in the plugin and I don't
> > | > have to do anything special for using compiler? Am I wrong? Have I to
> > "set
> > | > up" the compiler, and if yes, how to do it? Because, I didn't nothing
> > | > specal after "installing" of plugin! And what about API? Is there
> > | > something like that I can use (e.g. mark the printf-statement and
> press
> > | > F1)?
> > | >
> > | > Thanks a lot.
> > | >
> > | > Sean Evoy wrote:
> > | >
> > | >
> > | >>The short answer is that the basic builder in CDT uses makefiles, so
> no,
> > | >>you cannot avoid using a makefile. However, you can build all your
> > | >>targets using a single makefile. There is a previous thread that
> > | >>describes how to do this. I don't know exactly what the error message
> > | >>means (I am new to the product too), but if I had to guess, I would
> say
> > | >>that the builder could not launch make. Can you manually invoke make
> > | >>from a command prompt/xterm? If not, fix your path and try again.
> > | >
> > | >
> > | >
> > | >>Milutin wrote:
> > | >>
> > | >>>Thanks for your answer. But, suppose, I have a lot of small projects.
> > Have
> > | >>>I reali to supplay a makefile for every project, or is there a
> > possibility
> > | >>>to configur the environment so, that I can avoid makefile?
> > | >>>
> > | >>>I tried following example:
> > | >>>
> > | >>>// ========== Code-Example ==========
> > | >>>#include <stdio.h>
> > | >>>
> > | >>>void main()
> > | >>>{
> > | >>> printf("\nHallo World!\n\n");
> > | >>>}
> > | >>>// =====End of code example =========
> > | >>>
> > | >>>If I try to Bild my project, I become following message:
> > | >>>
> > | >>>make -k clean all
> > | >>>Build Error
> > | >>>(Exec error:Launching failed)
> > | >>>
> > | >>>What is the meaning of this message und what do I wrong?
> > | >>>
> > | >>>Thanks.
> > | >>>
> > | >>>Sean Evoy wrote:
> > | >>>
> > | >>>
> > | >>>
> > | >>>>I will assume you have created a C/C++ project and have your
> compiler
> > | >>>>environment properly set up. In order for Eclipse to build your
> > project,
> > | >>>>you need to supply a makefile in the root directory of your project
> > (you
> > | >>>>can modify the example below if you are not used to writing
> > makefiles).
> > | >>>
> > | >>>
> > | >>>>CC = g++
> > | >>>>CCFLAGS = -g -c
> > | >>>>LD = g++
> > | >>>>LDFLAGS = -o
> > | >>>>RM = rm -rf
> > | >>>
> > | >>>
> > | >>>>OBJS = \
> > | >>>> <someobjectfile>.o
> > | >>>
> > | >>>
> > | >>>>all : <yourexename>
> > | >>>
> > | >>>
> > | >>>><yourexename> : ${OBJS}
> > | >>>> ${LD} ${LDFLAGS} $@ ${OBJS}
> > | >>>
> > | >>>
> > | >>>><someobjectfile>.o : <somesourcefile>.cc
> > | >>>> ${CC} ${CCFLAGS} $?
> > | >>>
> > | >>>
> > | >>>>clean_all :
> > | >>>> ${RM} core ${OBJS} <yourexename>
> > | >>>
> > | >>>
> > | >>>>Milutin wrote:
> > | >>>>
> > | >>>>
> > | >>>>>Hi!
> > | >>>>>
> > | >>>>>I downloaded and instaled eclipse 2.0.2 and plugin for C/C++. After
> > that,
> > | >>>>>I entziped the C/C++ - plugin in ..\eclipse\plugin. And, that's
> all.
> > | >>>>>
> > | >>>>>I tried to make a C-Program and to compile it. But, hot to do it?
> > Have I
> > | >>>>>to configure something specially, or, how to bind the C/C++ plugin
> > for
> > | >>>>>writing and compiling C-Programs? I'm really confused.
> > | >>>>>
> > | >>>>>Thanks for any help.
> > | >>>>>
> > | >>>>
> > | >>>
> > | >>>
> > | >>>
> > | >
> > | >
> > | >
> > | >
> > |
> >
> >
>
>
Re: How to use C/C++ Plugin with eclipse! [message #54945 is a reply to message #54537] Fri, 20 December 2002 11:08 Go to previous messageGo to next message
Eclipse UserFriend
"otto mixa" <ottomixa@email.cz> wrote in message
news:atne69$bmr$1@rogue.oti.com...
| Hi,
| I'm sorry, I already have got it. I wrote the whole make path to build
| option.
| But I still don't know if c/c++ plugin is able to generate "Makefile" if
not
| what is the function of add target?
| Thanks a lot.
|
| Otto
|
The current version fo the CDT does not auto generate makefiles. We have a
team looking into this for the next version.

-Judy


|
Re: How to use C/C++ Plugin with eclipse! [message #57479 is a reply to message #54917] Thu, 09 January 2003 07:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mhu.gft.com

I too tried some hours to get it working and I almost became crazy.
But I think now I got it. You have to enter in the Build Command Text Box
something like c:\mingw\bin\mingw32-make -f makefile
then it will works.
But I also don't get the hello.o and hello.exe not in the outline but in
the directory they are made.


Roman Levandovsky wrote:


> I have a simillar problem, however the make utility dies quietly.
> If I try to build the hello.cpp file and I do not have the make file, there
is no errors telling me that makefile was not found or that the make command
does not exist.

> I have installed cygwin and MinGW both and still there are no errors but I
do not get hello.exe or hello.o
> I followed the example in the user guide to a tee and still no luck.

> I am runing windows 98 eclipse 2.0.2 and cdt 1.0.1, is this a know bug? Are
there any resolutions to this problem?

> Roman.

> On Tue, 17 Dec 2002 15:59:01 +0100, "otto mixa" <ottomixa@email.cz> wrote:
> > Dear all,
> > I've got the same problem. I've got installed cygwin, and I have set
windows
> > environments: PATH=c:\cygwin\bin and MAKE= c:\cygwin\bin\make.exe .
> > Should be in Win env. some other settings? I'm sorry but mentioned Guide is
> > not quite good.
> > I was try it with creating makefile and still the same error.(of course
that
> > I was unchecked the default make in preferences as it is in guide)
> > Also I was try by the normal way:
> > right click to preject->add make target; make->hello.exe, and error is :
> > make -k hello.exe
> >
> > Build Error
> >
> > (Exec error:Launching failed)
> >
> > ->Rebuild and the same error.
> >
> > Please where is the mistake. thanks a lot
> >
> > Otto
> >
> >
> >
> >
> >
> > "Judy N. Green" <jgreen@qnx.com> wrote in message
> > news:atb0un$uim$1@rogue.oti.com...
> > >
> > > "Sean Evoy" <nospam_sevoy@rational.com> wrote in message
> > > news:3DF8A357.1000606@rational.com...
> > > | There is no compiler supplied with the CDT. It is assumed you have a
> > > | compiler (and related utilities) already installed. You need to have a
> > > | make utility and compiler installed on your system, and both have to be
> > > | found in the path. I don't know what OS you are using, but if you are
on
> > > | Windows, you can get a gnu compiler, debugger, and make utility by
> > > | installing Cygwin (http://www.cygwin.com/) on your system.
> > > |
> > >
> > >
> > > You might want to follow the instructions in the CDT Users Guide ;)
> > >
> > >
> >
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/cdt- home/user/faq.ht
> > > ml?cvsroot=Tools_Project
> > >
> > > It has instructions including cygwin.
> > >
> > > -Judy
> > >
> > > --
> > > ¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨ ¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨¨¨
> > > Judy N. Green Software Engineer
> > > QNX Software Systems Ltd. www.qnx.com
> > > ¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨ ¨¨¨°ºo§oº°¨¨¨¨°ºo§oº°¨¨¨
> > >
> > > | Milutin wrote:
> > > | > You wrote the following:
> > > | >
> > > | >
> > > | >>I will assume you have created a C/C++ project and have your compiler
> > > | >
> > > | > environment properly set up.
> > > | >
> > > | > I'm not sure, what do you mean with "have your compiler environment
> > > | > properly set up"? I thought, the compiler is in the plugin and I
don't
> > > | > have to do anything special for using compiler? Am I wrong? Have I to
> > > "set
> > > | > up" the compiler, and if yes, how to do it? Because, I didn't nothing
> > > | > specal after "installing" of plugin! And what about API? Is there
> > > | > something like that I can use (e.g. mark the printf-statement and
> > press
> > > | > F1)?
> > > | >
> > > | > Thanks a lot.
> > > | >
> > > | > Sean Evoy wrote:
> > > | >
> > > | >
> > > | >>The short answer is that the basic builder in CDT uses makefiles, so
> > no,
> > > | >>you cannot avoid using a makefile. However, you can build all your
> > > | >>targets using a single makefile. There is a previous thread that
> > > | >>describes how to do this. I don't know exactly what the error message
> > > | >>means (I am new to the product too), but if I had to guess, I would
> > say
> > > | >>that the builder could not launch make. Can you manually invoke make
> > > | >>from a command prompt/xterm? If not, fix your path and try again.
> > > | >
> > > | >
> > > | >
> > > | >>Milutin wrote:
> > > | >>
> > > | >>>Thanks for your answer. But, suppose, I have a lot of small
projects.
> > > Have
> > > | >>>I reali to supplay a makefile for every project, or is there a
> > > possibility
> > > | >>>to configur the environment so, that I can avoid makefile?
> > > | >>>
> > > | >>>I tried following example:
> > > | >>>
> > > | >>>// ========== Code-Example ==========
> > > | >>>#include <stdio.h>
> > > | >>>
> > > | >>>void main()
> > > | >>>{
> > > | >>> printf("\nHallo World!\n\n");
> > > | >>>}
> > > | >>>// =====End of code example =========
> > > | >>>
> > > | >>>If I try to Bild my project, I become following message:
> > > | >>>
> > > | >>>make -k clean all
> > > | >>>Build Error
> > > | >>>(Exec error:Launching failed)
> > > | >>>
> > > | >>>What is the meaning of this message und what do I wrong?
> > > | >>>
> > > | >>>Thanks.
> > > | >>>
> > > | >>>Sean Evoy wrote:
> > > | >>>
> > > | >>>
> > > | >>>
> > > | >>>>I will assume you have created a C/C++ project and have your
> > compiler
> > > | >>>>environment properly set up. In order for Eclipse to build your
> > > project,
> > > | >>>>you need to supply a makefile in the root directory of your project
> > > (you
> > > | >>>>can modify the example below if you are not used to writing
> > > makefiles).
> > > | >>>
> > > | >>>
> > > | >>>>CC = g++
> > > | >>>>CCFLAGS = -g -c
> > > | >>>>LD = g++
> > > | >>>>LDFLAGS = -o
> > > | >>>>RM = rm -rf
> > > | >>>
> > > | >>>
> > > | >>>>OBJS = \
> > > | >>>> <someobjectfile>.o
> > > | >>>
> > > | >>>
> > > | >>>>all : <yourexename>
> > > | >>>
> > > | >>>
> > > | >>>><yourexename> : ${OBJS}
> > > | >>>> ${LD} ${LDFLAGS} $@ ${OBJS}
> > > | >>>
> > > | >>>
> > > | >>>><someobjectfile>.o : <somesourcefile>.cc
> > > | >>>> ${CC} ${CCFLAGS} $?
> > > | >>>
> > > | >>>
> > > | >>>>clean_all :
> > > | >>>> ${RM} core ${OBJS} <yourexename>
> > > | >>>
> > > | >>>
> > > | >>>>Milutin wrote:
> > > | >>>>
> > > | >>>>
> > > | >>>>>Hi!
> > > | >>>>>
> > > | >>>>>I downloaded and instaled eclipse 2.0.2 and plugin for C/C++.
After
> > > that,
> > > | >>>>>I entziped the C/C++ - plugin in ..\eclipse\plugin. And, that's
> > all.
> > > | >>>>>
> > > | >>>>>I tried to make a C-Program and to compile it. But, hot to do it?
> > > Have I
> > > | >>>>>to configure something specially, or, how to bind the C/C++ plugin
> > > for
> > > | >>>>>writing and compiling C-Programs? I'm really confused.
> > > | >>>>>
> > > | >>>>>Thanks for any help.
> > > | >>>>>
> > > | >>>>
> > > | >>>
> > > | >>>
> > > | >>>
> > > | >
> > > | >
> > > | >
> > > | >
> > > |
> > >
> > >
> >
> >
Re: How to use C/C++ Plugin with eclipse! [message #58999 is a reply to message #54537] Tue, 21 January 2003 03:52 Go to previous message
Eclipse UserFriend
otto mixa wrote:
> Hi,
> I'm sorry, I already have got it. I wrote the whole make path to build
> option.
> But I still don't know if c/c++ plugin is able to generate "Makefile" if not
> what is the function of add target?

Suppose the following Makefile with multiple Targets (real and phony):
--- SNIP ---
############################################################ #########
# Generalized Makefile
#
############################################################ #########

TARGET_ARCH = uclinux

#LDFLAGS = -lpthread -lstdc++
# Which program to build
PROGRAMS = OSLF_TaskTest1 cppthread cpptest1 cppfuncptr
CLEAN_FILES = $(PROGRAMS)

###########################################################
# Settings for Program
#PROGRAMS += cpptest1
cpptest1_OBJS = main.o CTask.o
cpptest1_SRCS = main.cpp CTask.cpp
cpptest1_LIBS = pthread stdc++

###########################################################
# Settings for Program
#PROGRAMS += cppfuncptr
cppfuncptr_OBJS = cppfuncptr.o
cppfuncptr_LIBS = pthread stdc++
cppfuncptr_SRCS = cppfuncptr.cpp

###########################################################
# Settings for Program
#PROGRAMS += cppthread
cppthread_OBJS = cppthread.o
cppthread_LIBS = pthread stdc++
cppthread_SRCS = cppthread.cpp

###########################################################
# Settings for Program
#PROGRAMS += OSLF_TaskTest1.cpp
OSLF_TaskTest1_OBJS = OSLF_TaskTest1.o ../bin/$(TARGET_ARCH)/OSLF_Task.o
OSLF_TaskTest1_LIBS = pthread stdc++
OSLF_TaskTest1_DEFINES = -D_UCLINUX
OSLF_TaskTest1_INCS = ../arch/$(TARGET_ARCH)
OSLF_TaskTest1_SRCS = OSLF_TaskTest1.cpp

###########################################################
# PHONY Targets are no real targets
# (they don't produce a real file)
..PHONY: all debug clean

###########################################################
# check if we want to build debug stuff
ifeq ($(MAKECMDGLOBALS),debug)
CXXFLAGS += -g
endif

###########################################################
# Template for cleaning up
define CLEAN_template
$(eval CLEAN_OBJS += $(1) $($(1)_OBJS) )
endef

###########################################################
# Template for creating an on-the-fly target rule
define PROGRAMS_template
$(eval $(1)_LIBS = $(patsubst %,-l%,$($(1)_LIBS)))
$(eval $(1)_INCS = $(patsubst %,-I%,$($(1)_INCS)))
CXXFLAGS += $($(1)_DEFINES) $($(1)_INCS)
$(1): $$($(1)_OBJS)
@echo "############## LINK ################"
@echo ">> Target: $(1)"
$$(CXX) -o $$@ $$^ $($(1)_LIBS)
# next line is better for C-Programs
# $$(LINK.o) -o $$@ $$^ $($(1)_LIBS)

endef

############################################################ ######
# the all rule ( call 'make all' on Console )
all: $(PROGRAMS)
@echo "### Making Files normal"

############################################################ ######
# the debug rule ( call 'make debug' on Console )
debug: $(PROGRAMS)
@echo "### Making Files debuggable"

############################################################ ######
# the clean rule ( call 'make clean' on Console )
# deletes all file given in CLEAN_OBJS ( build by template)
clean:
rm -f core $(CLEAN_OBJS)

############################################################ ######
# two macros for creating rules out of the template for each target
# given in PROGRAMS and CLEAN_FILES above
$(foreach prog,$(PROGRAMS),$(eval $(call PROGRAMS_template,$(prog))))
$(foreach prog,$(PROGRAMS),$(eval $(call CLEAN_template,$(prog))))

############################################################ ######
# general build rule for objects out of .cpp files
%.o: %.cpp
@echo "############# COMPILE ##############"
$(CXX) $(CXXFLAGS) -o $@ -c $<

########################### MAKEFILE END #############################

The Rules all, debug and clean you can reach from the Kontext-Menu.
For each Program in this Makefile you can add Targets with 'Add Target'.
But you have to write the Targets within this Makefile yourself. As the
Rules are templatized, all you would do is copying the top defines
--- SNIP ---
###########################################################
# Settings for Program
#PROGRAM = cppthread
cppthread_OBJS = cppthread.o
cppthread_LIBS = pthread stdc++
cppthread_SRCS = cppthread.cpp
--- SNIP ---
and add the Program name to PROGRAMS. Watch the Programs final name
corresponding the Variable-Prefixes! This is important for the template
to work.

Though, you could 'Add Target' for example 'cppthread', and then by
clicking on it, it will be build for itself, leaving the other targets
untouched.

This Makefile is for GNU make.
As told before, the documentation to GNU make is at www.gnu.org
available. Also the docs to GNU GCC/G++/CPP/LD is there.

With the help of gcc/g++ '-E' option, you will also be able to make
dependencies files and use them in the Makefile with an
-include <depfile>. But for this, consult the docs before.

Hope, that made it clear.
Henning
Previous Topic:CDT and Eclipse 2.1
Next Topic:code assist
Goto Forum:
  


Current Time: Wed May 28 19:39:48 EDT 2025

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

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

Back to the top