I have a module pgm that contains only definitions and functions. I have not included a main() statement.
The module does have an associated header file.
When I compile the module I am getting errors as attached:
usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o: In function `_start':
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [mod.o] Error 1
These are not preventing my other programmes from compiling or running.
However, I also have a makefile that is to compile the "group" of programmes - and if I try "make all" - the compiler is displaying this error and then stopping.
Do I need a main method in my module? (I have tried to put one in, but get errors "multiple definition of main"
If not - is there a flag I should use to compile the module that will eliminate the error.