hello i'm writing this code to teach myself programming with modules, but obviously theres something wrong since my compiler says
Compiling BPS.C:
Linking bps.exe:
Linker Warning: No module definition file specified: using defaults
Linker Error: Undefined symbol _output in module BPS.C
Linker Error: Undefined symbol _input in module BPS.C
Code:
//inout.c
#include<stdio.h>
#include"inout.h"
static void stars (void); //prints out a line of *, local function prototype defined here
int input(void){ //prototype in header
char c;
int res,keuze;
stars ();
printf(" 1. BPM 2 FPS\n 2. FPS 2 BPM\n\nkeuze: ");
stars ();
while((res=scanf("%d%c",&keuze,&c))!=2 || c!='\n' || keuze<1 || keuze>2){
scanf("%*[^\n]%*c");
printf("tik 1 of 2");
}
return keuze;
}
void output(int keuze){
printf("uw keuze is %d",keuze);
}
static void stars(void){
int i;
for(i=0; i<30; i++){
putchar('*');
}
}
Code:
//inout.h
int input(void);
void output(int keuze);
Code:
//bps.c
#include<stdio.h>
#include"inout.h"
int main (void){
int keuze;
keuze=input();
output(keuze);
return 0;
}
all files are stored in same directory, so why isnt this working?