input.c
文件:
#include "input.h"
void file_processing( FILE *course_file, FILE *student_file )
{
char buf[256], line[256];
........
}
input.h
文件:
#ifndef STUDENT_H
#define STUDENT_H
#include <string.h>
void process_command( char command[256] );
void file_processing( FILE *course_file, FILE *student_file );
#endif
main.c
文件:
#include "input.h"
int main( int argc, char *argv[] ){
.........
file_processing(course_file, student_file);
...
return 0;
}
编译器向我抛出了这个错误:
main.c: In function ‘int main(int, char**)’:
main.c:53:46: error: ‘file_processing’ was not declared in this scope
任何人都可以给我一些关于看什么的提示吗?
更新: 经过一些额外的编码后,我得到了一个不同的错误。
/tmp/ccJ4nsnm.o: In function `main':
main.c:(.text+0x1e5): undefined reference to `file_processing(_IO_FILE*, _IO_FILE*)'
collect2: ld returned 1 exit status