Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Am I dumb? ,How to create a make file?
Am I dumb? ,How to create a make file? [message #27799] Mon, 29 April 2002 16:45 Go to next message
Eclipse UserFriend
Originally posted by: mysearcher.gmx.de

Hi there,

I've installed the R2 eclipse with the matching CDT extension and just in
the progress of setting up a new source tree. So I created a couple of
dirs, say

/usr/dev/hpp
/usr/dev/hpp/src
/usr/dev/hpp/header
/usr/dev/hpp/cpp_api

For this example source is going to move into the 2nd and 4th line, header
files will be found in the 3rd one. Beneath the 1st one additional
(doc...) dirs will be placed.
Now comes what I'm a little confused about with using eclipse/cdt: How and
where shall I create the necessary make files? E.g I'd like to start first
with a "main.cpp" in the 2nd directory. What must be done in order to
include new files successive? Although I know how and what to do using vi
or emacs I'm becoming very confused with cdt <ggg>. Any "cdt&make" howto
available?

Thanks for any help,
Soeren Gerlach


(PS: Sorry for the empty post, just'd hit the return button too early...;-)
Re: Am I dumb? ,How to create a make file? [message #27840 is a reply to message #27799] Mon, 29 April 2002 17:27 Go to previous messageGo to next message
Eclipse UserFriend
Hi Soeren,

The CDT does not actually create makefiles. Instead we provide an integrated method of using autoconf to handle the
generation of a makefile\configure environment for you. For your situation, you should be able to just:

1. Right-Click on your project and choose Autoconf > Configure
(this does some magic which should eventually result in Makefiles being created)
2. Right-Click on your project and choose Build.

I don't have time right now to verify that I haven't missed a step, but I will first thing in the morning (and explain a
little bit more about the magic that is going on).

Hope that helps...

Jeff.


"Soeren Gerlach" <mysearcher@gmx.de> wrote in message news:aakbdi$36v$1@rogue.oti.com...
> Hi there,
>
> I've installed the R2 eclipse with the matching CDT extension and just in
> the progress of setting up a new source tree. So I created a couple of
> dirs, say
>
> /usr/dev/hpp
> /usr/dev/hpp/src
> /usr/dev/hpp/header
> /usr/dev/hpp/cpp_api
>
> For this example source is going to move into the 2nd and 4th line, header
> files will be found in the 3rd one. Beneath the 1st one additional
> (doc...) dirs will be placed.
> Now comes what I'm a little confused about with using eclipse/cdt: How and
> where shall I create the necessary make files? E.g I'd like to start first
> with a "main.cpp" in the 2nd directory. What must be done in order to
> include new files successive? Although I know how and what to do using vi
> or emacs I'm becoming very confused with cdt <ggg>. Any "cdt&make" howto
> available?
>
> Thanks for any help,
> Soeren Gerlach
>
>
> (PS: Sorry for the empty post, just'd hit the return button too early...;-)
>
>
Re: Am I dumb? ,How to create a make file? [message #27880 is a reply to message #27799] Tue, 30 April 2002 08:48 Go to previous messageGo to next message
Eclipse UserFriend
Hi Soeren,

So using the 20020321 Linux Stable Eclipse Build and the matching CDT driver I tried to mimic what you are trying to do:
Here's what I did (looks like a lot of steps, but I'm just being very explicit).

1. Created an initially Empty Project called hpp.
2. Created 3 sub-directories (src, header, and cpp_api).
3. Created a new file in the hpp/src directory called main.cpp with the following contents:

//main.cpp
#include "iostream.h"
int main()
{
cout << "Hello" << endl;
}

4. Right-Clicked on my project (hpp) and chose "Autoconf > Configure".
5. Watched the Output View until the job was completed (took about 5 seconds).
6. Verified that there are now Makefiles (among other files) now created.
7. Right-Clicked on my project and chose "Build Project".
8. Watched the Output View until the job was completed.
9. Verified that a working executable was created by selecting the hpp/src directory, then going to the Command
Launcher view, and typing "src" (which is the default exectuable name generated).
10. Verified in the Output View that "Hello" was printed out. It was!

Now I wanted to add a header file to my project:

11. I went to the hpp/header directory and created a new file called "main.hpp" with the following contents:

//main.hpp
int doubleIt(int x)
{
return x*2;
}

12. I went to back to main.cpp and changed the content to:

#include "iostream.h"
#include "main.hpp"
int main()
{
cout << "5 doubled is " << doubleIt(5) << endl;
}

13. Now the only tricky part of the whole procedure...To set up the include path properly, I had to open the Makefile.am
that is in the hpp/src directory and change the line "INCLUDE=" to

INCLUDE=-I../header

14. Then I right-clicked on the project and chose "Autoconf > Configure" again.
15. Then I right-clicked on the project and chose "Build Project" again.
16. Then I selected the hpp/src directory and went to the Command Launcher view and typed "src" which resulted in the
following appearing the Output View:

5 doubled is 10

We have a few enhancements that deal with making this process more intuitive. For example:
10336(http://bugs.eclipse.org/bugs/show_bug.cgi?id=10336) - Which would give the user an integrated graphical way of
updating Makefile.am files. So in the steps above, you can imagine setting the Include Path graphically.
Also you may be wondering how change the name of the Executable from "src" to something else. Currently you have to
goto the hpp/src/Makefile.am file and replace all occurrences of "src" with your new name. This process will be made
much easier by becoming a simple action once 10336 is implemented.

Hope that helps..and feel free to make any suggestions for how we can improve the experience.

Jeff.

"Soeren Gerlach" <mysearcher@gmx.de> wrote in message news:aakbdi$36v$1@rogue.oti.com...
> Hi there,
>
> I've installed the R2 eclipse with the matching CDT extension and just in
> the progress of setting up a new source tree. So I created a couple of
> dirs, say
>
> /usr/dev/hpp
> /usr/dev/hpp/src
> /usr/dev/hpp/header
> /usr/dev/hpp/cpp_api
>
> For this example source is going to move into the 2nd and 4th line, header
> files will be found in the 3rd one. Beneath the 1st one additional
> (doc...) dirs will be placed.
> Now comes what I'm a little confused about with using eclipse/cdt: How and
> where shall I create the necessary make files? E.g I'd like to start first
> with a "main.cpp" in the 2nd directory. What must be done in order to
> include new files successive? Although I know how and what to do using vi
> or emacs I'm becoming very confused with cdt <ggg>. Any "cdt&make" howto
> available?
>
> Thanks for any help,
> Soeren Gerlach
>
>
> (PS: Sorry for the empty post, just'd hit the return button too early...;-)
>
>
Re: Am I dumb? ,How to create a make file? [message #27920 is a reply to message #27799] Tue, 30 April 2002 09:27 Go to previous messageGo to next message
Eclipse UserFriend
Hi Soeren,

I also recommend that you take a look at the project management tutorial.
This will hopefully help you solving more problems as you experience using
the CDT support for GNU project management tools - Autoconf, Automake and
Libtool. You can find it under Eclipse\'s Help main menu by selecting
\"Help Contents\"
-> \"C/C++ Development User Guide\" -> \"Tutorial\" -> \"Project Management
Using GNU Tools\". Hope this will help. Your comments and suggestions are very
much appreciated.

Yasser



Soeren Gerlach wrote:

> Hi there,

> I\'ve installed the R2 eclipse with the matching CDT extension and just in
> the progress of setting up a new source tree. So I created a couple of
> dirs, say

> /usr/dev/hpp
> /usr/dev/hpp/src
> /usr/dev/hpp/header
> /usr/dev/hpp/cpp_api

> For this example source is going to move into the 2nd and 4th line, header
> files will be found in the 3rd one. Beneath the 1st one additional
> (doc...) dirs will be placed.
> Now comes what I\'m a little confused about with using eclipse/cdt: How and
> where shall I create the necessary make files? E.g I\'d like to start first
> with a \"main.cpp\" in the 2nd directory. What must be done in order to
> include new files successive? Although I know how and what to do using vi
> or emacs I\'m becoming very confused with cdt <ggg>. Any \"cdt&make\" howto
> available?

> Thanks for any help,
> Soeren Gerlach


> (PS: Sorry for the empty post, just\'d hit the return button too early...;-)
Re: Am I dumb? ,How to create a make file? [message #28000 is a reply to message #27880] Tue, 30 April 2002 12:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mysearcher.gmx.de

Jeff, Yasser,

thanks very much for your detailed descriptions! I'd probably figure out
the procedure now. Hm...see if I can make some comments on improving the
GUI thereafter (as mentioned from Jeff already, concerning the graphical
way of updating the make file).


Thanks & regards,
Soeren Gerlach
Re: Am I dumb? ,How to create a make file? [message #38797 is a reply to message #27920] Mon, 29 July 2002 07:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ljshuenn.iii.org.tw

Dear Yasser,

I install CDT but I can't find the document. What package do you install
? Or can you send the document to me ? Thanks.


"Yasser Elmankabady" <eyasser@ca.ibm.com>
???????:aam635$kk1$1@rogue.oti.com...
> Hi Soeren,
>
> I also recommend that you take a look at the project management tutorial.
> This will hopefully help you solving more problems as you experience using
> the CDT support for GNU project management tools - Autoconf, Automake and
> Libtool. You can find it under Eclipse\'s Help main menu by selecting
> \"Help Contents\"
> -> \"C/C++ Development User Guide\" -> \"Tutorial\" -> \"Project
Management
> Using GNU Tools\". Hope this will help. Your comments and suggestions are
very
> much appreciated.
>
> Yasser
>
>
>
> Soeren Gerlach wrote:
>
> > Hi there,
>
> > I\'ve installed the R2 eclipse with the matching CDT extension and just
in
> > the progress of setting up a new source tree. So I created a couple of
> > dirs, say
>
> > /usr/dev/hpp
> > /usr/dev/hpp/src
> > /usr/dev/hpp/header
> > /usr/dev/hpp/cpp_api
>
> > For this example source is going to move into the 2nd and 4th line,
header
> > files will be found in the 3rd one. Beneath the 1st one additional
> > (doc...) dirs will be placed.
> > Now comes what I\'m a little confused about with using eclipse/cdt: How
and
> > where shall I create the necessary make files? E.g I\'d like to start
first
> > with a \"main.cpp\" in the 2nd directory. What must be done in order to
> > include new files successive? Although I know how and what to do using
vi
> > or emacs I\'m becoming very confused with cdt <ggg>. Any \"cdt&make\"
howto
> > available?
>
> > Thanks for any help,
> > Soeren Gerlach
>
>
> > (PS: Sorry for the empty post, just\'d hit the return button too
early...;-)
>
>
>
>
>
Re: Am I dumb? ,How to create a make file? [message #38892 is a reply to message #38797] Mon, 29 July 2002 11:27 Go to previous messageGo to next message
Eclipse UserFriend
When you installed the CDT for Eclipse 2.0, what projects were supplied in
the zip file?
The reason I ask, is that there has been a transition between the 2.0
version that was based on the previous 1.0 version and a completely new 2.0
version of the CDT. I realize that this can be confusing.

The new version is what is currently available from the CDT download page.
It currently contain s the projects:
org.eclipse.cdt.core
org.eclipse.cdt.ui

The answer to your question will be completely different depending on which
version you have installed.
If you have the newest version installed there is a section in the users.faq
that may help you with makefiles.
(link is available from the homepage of the CDT www.eclipse.org/cdt)
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/cdt- home/user/faq.ht
ml?cvsroot=Tools_Project

-Judy

--
Re: Am I dumb? ,How to create a make file? [message #39139 is a reply to message #38892] Fri, 02 August 2002 04:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ljshuenn.iii.org.tw

Hi, Judy,

I find the document and solve the problem. Thanks.


"Judy N. Green" <jgreen@qnx.com>
Re: Am I dumb? ,How to create a make file? [message #169621 is a reply to message #27880] Mon, 15 May 2006 19:17 Go to previous messageGo to next message
Eclipse UserFriend
I dont see this "Autoconf" menu when I right click on my project file.
I would live to have this feature as well since I'm trying to do some
Linux work :-( I'm using Eclipse 3.1.1 with CDT SDK 3.0.2 Am I doing
something wrong?

Thank you
Linda

Jeff Turnham wrote:
> Hi Soeren,
>
> So using the 20020321 Linux Stable Eclipse Build and the matching CDT driver I tried to mimic what you are trying to do:
> Here's what I did (looks like a lot of steps, but I'm just being very explicit).
>
> 1. Created an initially Empty Project called hpp.
> 2. Created 3 sub-directories (src, header, and cpp_api).
> 3. Created a new file in the hpp/src directory called main.cpp with the following contents:
>
> //main.cpp
> #include "iostream.h"
> int main()
> {
> cout << "Hello" << endl;
> }
>
> 4. Right-Clicked on my project (hpp) and chose "Autoconf > Configure".
> 5. Watched the Output View until the job was completed (took about 5 seconds).
> 6. Verified that there are now Makefiles (among other files) now created.
> 7. Right-Clicked on my project and chose "Build Project".
> 8. Watched the Output View until the job was completed.
> 9. Verified that a working executable was created by selecting the hpp/src directory, then going to the Command
> Launcher view, and typing "src" (which is the default exectuable name generated).
> 10. Verified in the Output View that "Hello" was printed out. It was!
>
> Now I wanted to add a header file to my project:
>
> 11. I went to the hpp/header directory and created a new file called "main.hpp" with the following contents:
>
> //main.hpp
> int doubleIt(int x)
> {
> return x*2;
> }
>
> 12. I went to back to main.cpp and changed the content to:
>
> #include "iostream.h"
> #include "main.hpp"
> int main()
> {
> cout << "5 doubled is " << doubleIt(5) << endl;
> }
>
> 13. Now the only tricky part of the whole procedure...To set up the include path properly, I had to open the Makefile.am
> that is in the hpp/src directory and change the line "INCLUDE=" to
>
> INCLUDE=-I../header
>
> 14. Then I right-clicked on the project and chose "Autoconf > Configure" again.
> 15. Then I right-clicked on the project and chose "Build Project" again.
> 16. Then I selected the hpp/src directory and went to the Command Launcher view and typed "src" which resulted in the
> following appearing the Output View:
>
> 5 doubled is 10
>
> We have a few enhancements that deal with making this process more intuitive. For example:
> 10336(http://bugs.eclipse.org/bugs/show_bug.cgi?id=10336) - Which would give the user an integrated graphical way of
> updating Makefile.am files. So in the steps above, you can imagine setting the Include Path graphically.
> Also you may be wondering how change the name of the Executable from "src" to something else. Currently you have to
> goto the hpp/src/Makefile.am file and replace all occurrences of "src" with your new name. This process will be made
> much easier by becoming a simple action once 10336 is implemented.
>
> Hope that helps..and feel free to make any suggestions for how we can improve the experience.
>
> Jeff.
>
> "Soeren Gerlach" <mysearcher@gmx.de> wrote in message news:aakbdi$36v$1@rogue.oti.com...
>
>>Hi there,
>>
>>I've installed the R2 eclipse with the matching CDT extension and just in
>>the progress of setting up a new source tree. So I created a couple of
>>dirs, say
>>
>> /usr/dev/hpp
>> /usr/dev/hpp/src
>> /usr/dev/hpp/header
>> /usr/dev/hpp/cpp_api
>>
>>For this example source is going to move into the 2nd and 4th line, header
>>files will be found in the 3rd one. Beneath the 1st one additional
>>(doc...) dirs will be placed.
>>Now comes what I'm a little confused about with using eclipse/cdt: How and
>>where shall I create the necessary make files? E.g I'd like to start first
>>with a "main.cpp" in the 2nd directory. What must be done in order to
>>include new files successive? Although I know how and what to do using vi
>>or emacs I'm becoming very confused with cdt <ggg>. Any "cdt&make" howto
>>available?
>>
>>Thanks for any help,
>>Soeren Gerlach
>>
>>
>>(PS: Sorry for the empty post, just'd hit the return button too early...;-)
>>
>>
>
>
>
Re: Am I dumb? ,How to create a make file? [message #170213 is a reply to message #169621] Tue, 23 May 2006 13:26 Go to previous message
Eclipse UserFriend
IIRC there was an autotools plugin that came out of last year's Google
"Summer of Code". It was tailored to doing KDE development, but had
straightforward non-KDE capabilities. I think it wasn't really
completed, undocumented, and its features were hard for me to figure
out. Eventually I gave up on it and haven't checked on its recent
progress. Here's the link - try it out and let the list know how it
works....

http://kde-eclipse.pwsp.net/

dan


Linda Smith wrote:
> I dont see this "Autoconf" menu when I right click on my project file. I
> would live to have this feature as well since I'm trying to do some
> Linux work :-( I'm using Eclipse 3.1.1 with CDT SDK 3.0.2 Am I doing
> something wrong?
>
> Thank you
> Linda
>
> Jeff Turnham wrote:
>
>> Hi Soeren,
>>
>> So using the 20020321 Linux Stable Eclipse Build and the matching CDT
>> driver I tried to mimic what you are trying to do:
>> Here's what I did (looks like a lot of steps, but I'm just being very
>> explicit).
>>
>> 1. Created an initially Empty Project called hpp.
>> 2. Created 3 sub-directories (src, header, and cpp_api).
>> 3. Created a new file in the hpp/src directory called main.cpp with
>> the following contents:
>>
>> //main.cpp
>> #include "iostream.h"
>> int main()
>> {
>> cout << "Hello" << endl;
>> }
>>
>> 4. Right-Clicked on my project (hpp) and chose "Autoconf > Configure".
>> 5. Watched the Output View until the job was completed (took about 5
>> seconds).
>> 6. Verified that there are now Makefiles (among other files) now
>> created.
>> 7. Right-Clicked on my project and chose "Build Project".
>> 8. Watched the Output View until the job was completed.
>> 9. Verified that a working executable was created by selecting the
>> hpp/src directory, then going to the Command
>> Launcher view, and typing "src" (which is the default exectuable name
>> generated).
>> 10. Verified in the Output View that "Hello" was printed out. It was!
>>
>> Now I wanted to add a header file to my project:
>>
>> 11. I went to the hpp/header directory and created a new file called
>> "main.hpp" with the following contents:
>>
>> //main.hpp
>> int doubleIt(int x)
>> {
>> return x*2;
>> }
>>
>> 12. I went to back to main.cpp and changed the content to:
>>
>> #include "iostream.h"
>> #include "main.hpp"
>> int main()
>> {
>> cout << "5 doubled is " << doubleIt(5) << endl;
>> }
>>
>> 13. Now the only tricky part of the whole procedure...To set up the
>> include path properly, I had to open the Makefile.am
>> that is in the hpp/src directory and change the line "INCLUDE=" to
>>
>> INCLUDE=-I../header
>>
>> 14. Then I right-clicked on the project and chose "Autoconf >
>> Configure" again.
>> 15. Then I right-clicked on the project and chose "Build Project" again.
>> 16. Then I selected the hpp/src directory and went to the Command
>> Launcher view and typed "src" which resulted in the
>> following appearing the Output View:
>>
>> 5 doubled is 10
>>
>> We have a few enhancements that deal with making this process more
>> intuitive. For example:
>> 10336(http://bugs.eclipse.org/bugs/show_bug.cgi?id=10336) - Which
>> would give the user an integrated graphical way of
>> updating Makefile.am files. So in the steps above, you can imagine
>> setting the Include Path graphically.
>> Also you may be wondering how change the name of the Executable from
>> "src" to something else. Currently you have to
>> goto the hpp/src/Makefile.am file and replace all occurrences of "src"
>> with your new name. This process will be made
>> much easier by becoming a simple action once 10336 is implemented.
>>
>> Hope that helps..and feel free to make any suggestions for how we can
>> improve the experience.
>>
>> Jeff.
>>
>> "Soeren Gerlach" <mysearcher@gmx.de> wrote in message
>> news:aakbdi$36v$1@rogue.oti.com...
>>
>>> Hi there,
>>>
>>> I've installed the R2 eclipse with the matching CDT extension and
>>> just in
>>> the progress of setting up a new source tree. So I created a couple of
>>> dirs, say
>>>
>>> /usr/dev/hpp
>>> /usr/dev/hpp/src
>>> /usr/dev/hpp/header
>>> /usr/dev/hpp/cpp_api
>>>
>>> For this example source is going to move into the 2nd and 4th line,
>>> header
>>> files will be found in the 3rd one. Beneath the 1st one additional
>>> (doc...) dirs will be placed.
>>> Now comes what I'm a little confused about with using eclipse/cdt:
>>> How and
>>> where shall I create the necessary make files? E.g I'd like to start
>>> first
>>> with a "main.cpp" in the 2nd directory. What must be done in order to
>>> include new files successive? Although I know how and what to do
>>> using vi
>>> or emacs I'm becoming very confused with cdt <ggg>. Any "cdt&make" howto
>>> available?
>>>
>>> Thanks for any help,
>>> Soeren Gerlach
>>>
>>>
>>> (PS: Sorry for the empty post, just'd hit the return button too
>>> early...;-)
>>>
>>>
>>
>>
>>
Previous Topic:Import VS VC++ projects to eclipse?
Next Topic:Error makers disappeared
Goto Forum:
  


Current Time: Tue Aug 05 04:53:53 EDT 2025

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

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

Back to the top