[Note] the stm32 keilmdk displays warning: function XX declared implicitly

Source: Internet
Author: User

Warning: # 223-d: function "clr_tx_data" declared implicitly

 

Solution.

 

The preceding error message is used as an example:

 

1. Find the source file of clr_tx_data (), which is assumed in A. C;

 

2InA.hMediumFinally, declareClr_tx_data(), That is, add (assuming this function has no return value and no parameter)

Void clr_tx_data(Void);

3. Re-compile the previous warning to disappear.

 

 

Reference

A problem occurred when Keil compiled the stm32 !!

The program was compiled !! However, a warning is displayed:

Test. C (45): Warning: # 223-d: function "get_temp" declaredimplicitly

After looking at the mountains for a long time, I finally understood:

This is because get_temp is not loaded in the file you reference, although you have declared it in the header file !!

But there are still errors,

You only need to declare it once in the file you are using to solve the problem !!

 

In addition

In VC, it seems that there is no such warning. It should be the unique warning information of the Intel Compiler:

If the correct prototype cannot be found for c Functions of the non-void return type, the "Intel & reg; C ++ compiler" will print the following warning message:

Warning #266: function declared implicitly

This issue only occurs in C-language functions. In C ++ functions, a correct prototype must be declared before compilation and linking can be successful.

See the following C program

 

Main ()

{

Printf ("OK \ n ");

}

 

A warning is generated.

The correct method is to write the function definition or # include the header file of the function definition, so there is no problem.

 

 

 

 

 

[Note] the stm32 keilmdk displays warning: function XX declared implicitly

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.