Create a project from existing code in the NetBeans IDE and set code Help

Source: Internet
Author: User
Tags netbeans

To get more information about using C + + applications in the NetBeans IDE, see the C + + Application Learning Course page on the NetBeans Web site.

Tutorial Requirements

Before continuing, make sure that you have reviewed the requirements in this section.

Prerequisite

This tutorial assumes that you already have some programming experience in C and C + +.

The software required for this tutorial

Before you begin, you will need to install NetBeans 6.0. The C + + download options include NetBeans IDE 6.0 and C + + support.

What's the problem?

One of the responsibilities of the IDE is to build the code model. Code modeling is important for IDE features, such as:

Code completion

Hyperlinks

Navigation

To generate the model correctly, the IDE needs information about the project, such as:

Compiled files

which compiler to use

User contains path and macros in each compiled file

Header file to use

Without this information, the IDE cannot generate the appropriate model, which will cause the IDE's functional work to be faulty.

Of course, all this information is contained in makefile. The problem is that it is difficult to determine the necessary information for the following reasons:

A complex open source project usually has a hierarchical file structure, and the main makefile references the makefile under the subdirectory.

Makefile often use shell script commands.

Sometimes the behavior of the make utility depends on the action that precedes it, for example, based on the existence of the file created in the previous step.

The Netbeans IDE provides another way to get the necessary information for the model, based on compiler comments or debugging information in the following files:

Object files

Static or dynamic libraries

Executable file

What if the job?

Let's examine the typical scenario when creating a new Netbeans IDE project for an open source application.

This starts with downloading an open source project. We use MySQL project. The following instructions assume that we have loaded the open source project and installed the necessary software. Now we're going to configure this project.

To ensure the integrity of the compiler annotation, we provide additional compilation flags:

./configure CFLAGS="-g3 -gdwarf-2" CXXFLAGS="-g3 -gdwarf-2"

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.