Code blocks multi-file joint compilation

Source: Internet
Author: User

???? Code: blocks is an IDE that is often said to be very powerful. Although it is often used in the past, it has never used a high degree of functionality, and has never used it to write engineering things, to put it simply, more than one source file is added with other non-standard header files. Today, I want to test the syntax of multiple files. The result of CB is unfortunately not compiled, when a function in another source file is called in the main function, no reference is prompted. After several minutes, the cause is finally found:

In the manager window (that is, the List window of files such as source files and header files), right-click the source file of the defined function and a menu is displayed. Select properties and a dialog box appears.

???? Select the second Tag: Build, select both the check boxes debug and release in build, and then click OK to compile normally. Although I don't know if it is a correct solution, can I finally compile the program ~?

During the use of the extern function, an undefined error occurs,

Check the build log and find that only main. C,

Suddenly, belongs in targets: I did not select either of them, so the compilation failed,

You only need to select the files you want to add.

Code blocks multi-file joint compilation

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.