Hi,
I'm still a beginner for C programming. In my assignment I've encountered this problem and I know is a linker problem but I'm not sure how to solve it. I'm trying to link 3 files which 2 .c files and 1 .h file. Below are the codes for my file:
/*File driver.c (main file)*/
#include <stdio.h>
#include "MDAnalysis.h"
#include "MDAnalysis.c"
int main()
{
printScreen();
return 0;
}
/*File MDAnalysis.c*/
#include <stdio.h>
#include "MDAnalysis.h"
#include <stdlib.h>
void printScreen(void)
{
printf("Help me");
}
/*File: MDAnalysis.h*/
#ifndef _MDAnalysis_h
#define _MDAnalysis_h
/*Function prototypes*/
void printScreen(void);
#endif
These 3 files are my codings. I hope someone can help me out. I'm stuck at his problem for long time. Thanks in advance. Appreciate your help.