Header files should contain protypes, not definitions, unless they are inline. This is more common in C++. You headers should look like this:
called: myheader.h
Code:
#ifndef MYHEADER_H
#define MYHEADER_H
int my_newline();
int my_lines(int);
#endif
That's it. Than define those functions in a cpp file and include the header, for example:
mysource.cpp
Code:
#include "myheader.h"
#include<stdio.h>
int my_newline()
{
printf( "\n" );
return 0;
}
int my_lines(int x)
{
int y;
for(y=1; y<=x; y=y+1)
{
my_newline();
}
return 0;
}
Than in your main program:
Code:
#include "myheader.h"
#include<stdio.h>
int main()
{
printf("Hello");
my_newline();
my_lines(30);
my_newline();
return o;
}
And as far as DJGPP goes. I have no clue, but my guess would be:
gcc file.c mysource.c myheader.h -o file.exe -lm
Ofcourse this command could be very wrong. No clue.