Learning Tools-use autotools Plugins in eclipse

Source: Internet
Author: User

Most of the time, we are using ide to build our own small projects. Using IDE is sufficient for learning.

However, I gradually found that I could not satisfy myself by using IDE and found myself in a dilemma. Why?

First, the main starting point is to build a project by yourself.

Secondly, do you want to learn how to write makefile?

Third, are there any other options?

Learning makefile is fundamentally a good choice to learn how to organize and build a project. Is it really good?

When I try to find makefile-related documents, I can see the long document directory and the dense English. Even if I admit that my English is good,

But the header is also big. There are also some good Chinese makefile tutorials, but learning is tantamount to learning a new language. From the perspective of time, at least

It is not a wise choice for me.

 

Autotools & cmake should be a good choice?

The Comparison Between autotools and cmake is far-fetched.ArticleToo many. However, most of them are about how cmake replaces autotools. The most typical is

KDE has long abandoned autotools and switched to cmake. The advantages and disadvantages of the two are believed to be known only when you try them yourself. Sometimes you don't like it.

Yes. If your team is using autotools, can you say that you only use cmake? It is best to maintain and keep the team according to the actual situation and allow the team to surpass the team.

Drop is not allowed.

 

In fact, both autotools and cmake are an intermediate form of project organization building tools. The most typical sentence in the cmake circle is that cmake is programming.

Why? If you say makefile is written as a shell script, the elegant cmake method will make you feel that it is so easy to create a project in a language.

Autotools? At the beginning, I started to get started with cmake, which means I don't need to write so much. (maybe the demos I learned are relatively small, but I haven't

And autotools needs to follow the steps

Operation, and the association is strong.

 

If you are a newbie, read the materials by yourself. If you are a senior, please criticize and correct them ~

 

Language learning is from Hello WorldProgramTo learn autotools, start with a simple hello World sample project, and then introduce autotools.

The use of plugins in eclipse. Do you understand the principles and operation methods? You will not be confused when using third-party development tools, mainly when using eclipse autotools plugins

The default configuration has some problems, so you need to modify it yourself. We will introduce it later. Let's look at deom:

1. I created my own project directory helloworld on my desktop:

 

 
CD desktop mkdir helloworldtouch helloworld. C # include <stdio. h> # include <stdlib. h> int main (INT ARGs, char ** argv) {puts ("Hello world! \ N "); Return exit_success ;}

 

2. Execute autoscan under the current directory. Configure. Scan and autoscane. Log (Log File) files will be generated, and configure. Scan will be renamed to ask Configure. In

 
Autoscanmv Configure. Scan Configure. In

3. Edit the configure. In file:

4.Create makefile. Am and edit the file:

 

5. Create some necessary files to make the project look better:

 
Touch news authors changelog readme

 

6. generate necessary configuration files:

 
Autoreconf-FVI

 

In fact, there are many operations according to some orderly steps. Generally, the autogen. Sh script appears and the content in it is:

 

 
Aclocalautoheaderautomake -- add-missing Autoconf

 

 

7. Execute configure and then make to get the result. (Other operations are omitted)

 
./Configuremake

 

Finally, we get the executable file helloworld.

 

Hosts file.

Then there are some icing-on-the-cake operations, such as creating news, authors, changelog, readme etc... these files.

 

The following describes how to use autotools Plugins in eclipse.

 

1. First install autotools plugins:

 

2. Follow the general steps below to create a project: (For details, refer to the Eclipse plug-in help documentation help-> help contents)

 

3. Next we will find that the attempt to compile this project cannot be successful, and the actual errors of the terminal are as follows:

 

4. If you are sure that all the tools of the autotools series are installed, perform the following operations.

Select the helloworld project in the project view, and choose Project> Properties> General> Tools settings tab.

 

 

It can be seen that eclipse is only in the Organization by name, and the cause is that the path cannot be found. So we need to add the path:

 

After completing this, you can build pro & run application.

 

As for autogen. Sh, I saw related configuration options in eclipse, but I have not figured out how to use them. I will understand it later. Please try again.

If you know, you can also tell me.

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.