Call a function that is at another .C file

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Call a function that is at another .C file

1,625 次查看
jimwang90
Contributor I

I set up a project, have main(), Calibr_M.h and Calibr_M.c file, code as follow,

when I build it, always has a warning shows up:

Description Resource Path Location Type

C1858 Partial implicit parameter declaration main.c /TM800-2022/Sources line 304 C/C++ Problem Description Resource Path Location Type

C1440 This is causing previous message 1858 Calibr_M.h /TM800-2022/Project_Headers line 11 C/C++ Problem

 

include "mc9s08pa16.h"

#include "Calibr_M.h"

void main(void)

{

....

Calibration();

....

}

 

* Calibr_M.h * * Created on: Jun 7, 2022 * Author: Jim Wang */

#ifndef CALIBR_M_H_

#define CALIBR_M_H_

void Calibration();

#endif /* CALIBR_M_H_ */

 

* Calibr_M.c * * Created on: Jun 7, 2022 * Author: Jim Wang */

#include "Calibr_M.h"

#include <stdio.h>

void Calibration() {

}

0 项奖励
回复
3 回复数

1,619 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

HI @jimwang90 

Please revise below highlight line of code to

void Calibration();

 

ZhangJennie_0-1655457656112.png

 

Please check if this can remove warning C1858 and C1440

Thanks,

Jun Zhang

 

0 项奖励
回复

1,614 次查看
jimwang90
Contributor I

what ?! Our code is identical.

Anyway I cut and paste it to replace my code, it is the same warning shows me !

0 项奖励
回复

1,598 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Because I reproduced your problem on my side:

ZhangJennie_0-1655688862716.png

After this change, the warning disappears

ZhangJennie_1-1655688957948.png

This is the description and tip from help manual

ZhangJennie_2-1655689052575.png

 

For more, see CodeWarrior help.

Jun Zhang

 

0 项奖励
回复