Call a function that is at another .C file

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Call a function that is at another .C file

845 Views
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 Kudos
3 Replies

839 Views
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 Kudos

834 Views
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 Kudos

818 Views
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 Kudos