外部函数问题请教
在unit1.cpp中有一个自定义函数,我想在另一个文件中用到的话,大家说这样对吗,我试了有问题。
1.在unit1.cpp中自定好函数a extern void a()
2.在unit1.h中的public:// User declarations
__fastcall TForm1(TComponent* Owner);
void a(void);
3.在unit2.cpp中加入#include unit1.h
但是程序在执行过程中,在unit2.cpp中调用a函数的语句时,仍出现找不到函数定义的出错信息。