NetBeans Use Notes

Source: Internet
Author: User
Tags netbeans

NetBeans New Project a brand new project
  1. Select " file ">" New Project " to open the New Project Wizard.
  2. in the wizard, select "C + +" category.
  3. The wizard provides several types of new projects for you to choose from. Select "C + + Application"(C + + application), and then click next. ?
  4. through the wizard and using the default settings to create a "C-Application" ( C + + application) project. You can select the name and location of the project.
  5. Click "Finish" (complete) to exit the wizard.

A project with a logical folder is now created. The logical folder is not a directory. It is a way of organizing files and does not reflect where the files are physically stored on disk. Files that you add to a logical folder are automatically part of the project and are compiled when you build the project.

There are a lot of logical folders here, but in fact

There's nothing on the disk.

?

So where are these folders coming from?

They come from

Nbproject\configurations.xml

?

You can directly put the CPP file under the directory, and then a build, you try, it will tell you that your project is empty, it is because your files, not in the configurations inside the configuration, how to do manually add to the project? Well, obviously not. There's another way to build a project in NetBeans: C + + projects based on existing source code

Project building based on existing source code

?

Put the source code and makefile in the folder, select that directory, will automatically generate the project, and then follow the makefile written in the beginning of automatic cleanup and build, this is still very convenient. But not all of them can lead in, and some of them are gray.

If a CPP file becomes grayed out, the result is that you cannot use go to view the declaration directly, because in nbproject\configurations.xml they are defined, plus

It can be done without. h, only with CPP.

and the following

After adding entries, close the project and reopen the project to darken it and find the definition.

Makefile

When the plug-in was installed , a Make ,

?

For an application that includes hundreds of source files, the Make tool and the makefile file are used to clearly straighten out the relationships between the various source files. And so many source files, if you have to enter the GCC command to compile, it is very difficult for the programmer to endure. The Make tool can automatically complete the compilation work

?

The most basic function of the Make tool is to invoke the makefile. Makefile file to describe the dependencies between the source programs and to automatically maintain the compilation effort. Of course, the makefile file needs to be written in a certain syntax , explaining how to compile individual source files and connect to build executables , as well as define dependencies between source files. Makefile files are a common way for many compilers (including compilers under Windows) to maintain compilation information, and in an integrated development environment, users can modify the makefile file through a friendly interface.

IDE generates a Makefile to store all settings

Span style= "font-family:arial; Background-color:white ">" Project Properties " The properties changed in the (Project Properties) window are stored in the current configuration of the makefile

When you create an existing source code-based C + + Project, IDE will depend on the existing Makefile to provide instructions on how to compile and run the application.

?

?

Important Documents

Add to "Important Files" files in the (important files) folder are not part of the project and are not compiled when the project is built. These files are for reference only and are handy when you create a project with an existing makefile .

Switch between the logical and physical views of a project ( Project browsing and file browsing)

A project has both logical and physical views. You can switch between a logical view of a project and a physical view.

    1. Select "Files" (file) label. The window displays the physical view of the item. It represents the files and folders stored on the disk as is. ?
    2. Select "Projects" (item) label. The window displays a logical view of the item. ?

Project browsing does not reflect the true appearance of the file, he will show what is not, such as the Naomi folder under Nothing, it can show

?

To show the real hierarchy, go to the file to see:

No, No.

Operation Tips 1. Select the function and right-go to the Declaration

Do not select the following parameters, do not select the space

Go to overwrite covered, you can see the descendant class overrides this class, in a function that does have a call, you can see the descendant class overrides this class, where the virtual function declaration goes to the covered, there is no egg

?

2. Find files throughout your project

Right-click on the project name to find the input file name

3. Adjust the code format

Tool options

?

Make adjustments

4. Code formatting

Then check the code format

5. Look in the Output window

In the Output window, right-click Find, you can find what you want, save as can be saved as txt

No manual flipping.

?

6. Return to previous edit location

?

7. Notes

Next to that is uncomment

?

8. Look at the coverage of the function

Put the mouse on the Green shield, there is cover learner::classify.

?

?

9 Some CPP files grayed out, unable to find out the variable name

For example Naomiaode.cpp This, the solution is to re-create a file, the original file contents copied in the past

It's OK

If a CPP file becomes grayed out, the result is that you cannot use go to view the declaration directly, because in nbproject\configurations.xml they are defined, plus

It can be done without. h, only with CPP.

and the following

After adding entries, close the project and reopen the project to darken it and find the definition.

NetBeans Use Notes

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.