Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Linux Tools Project » Some questions regarding using autotools
Some questions regarding using autotools [message #568673] Thu, 01 April 2010 08:36 Go to next message
abxccd is currently offline abxccdFriend
Messages: 2
Registered: April 2010
Junior Member
Hi everyone,

I am now in the process of moving my project from kdevelop to eclipse. Reason being that I was not able to get some code to compile as a shared library within a project, and kdevelop being quite buggy.

I am using Ubuntu 9.10 as my development machine. What I have done is installed eclipse 3.5.1, CDT 6.0 and the latest version of linux tools.

I have created a GNU autotools project.
My directory structure is as follows:


So far, when it compiles, I get the following result (I have changed the built path to be in "debug"):


Firstly, where in the settings can I change so that myapp is compiled as myapp and not a.out?

Secondly, I would like to have myplugin.c compiled as How do I do this?

Thirdly, I would like the filestructure of debug to be as follows


How do I go about setting this?

Thank you :)
Re: Some questions regarding using autotools [message #568688 is a reply to message #568673] Thu, 01 April 2010 21:14 Go to previous message
Jeff Johnston is currently offline Jeff JohnstonFriend
Messages: 212
Registered: July 2009
Senior Member
If you indeed have an autotools project, that means you should have a configuration script, (configure) generated from or and an automake file ( You should end up with a generated Makefile in your build tree.

The Autotools plugin does not generate autotool files for you, though, when creating a new C or C++ GNU Autotools project, you can elect to create a sample ANSI Hello world project which includes autotool files for you to create a simple hello world executable with the name of the project. You can change this after-the-fact to replace the hello world source with your own code and just take advantage of the autotool files created.

If you are unfamiliar with autotools, I suggest you look at the online documentation you can find at:

To set up an executable with name myapp, there are multiple ways.

To do it via and have automake generate appropriate stuff in your Makefile, you can put:

bin_PROGRAMS = myapp
myapp_SOURCES = myapp.c

You can add additional sources to myapp_SOURCES if you need to.

When you run this through automake, you will get what you want. Automake will generate other targets for you such as info, install, etc...

Alternatively, you could just hard-code the Makefile targets in your

all: myapp

myapp: myapp.o
gcc -o $@ $<

myapp.o: myapp.c
gcc -c $<

These will end up in your generated Makefile as-is.

A shared library should use libtool. In your, you might have:

myplugin_la_LDFLAGS= -lc -lgcc

for libtool, you must have AC_PROG_LIBTOOL in your file.

Here is not a place to do a course on autotools or GNU make, so take a look at the documentation in conjunction with the examples above.
Previous Topic:Some questions regarding using autotools
Next Topic:SystemTap Dashboard broken?
Goto Forum:

Current Time: Fri Oct 15 21:21:38 GMT 2021

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

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

Back to the top