When trying to compile the following makefile,
All: test
Test: the h Point. H Point. CPP line_t. H line_t. CPP drawing_t. H drawing_t. CPP clipper_t. H clipper_t. CPP main. CPP
G + + -o test Point. The CPP line_t. CPP drawing_t. CPP clipper_t. CPP main. CPP - lglut
I got an error:
G + + -o test Point. The CPP line_t. CPP drawing_t. CPP clipper_t. CPP main. CPP
- lglut/usr/lib/GCC/i686 - - the gnu/Linux 4.6/../../../i386 - - the gnu/Linux crt1. O: In function _start ': (. Text + 0 x18) : undefined reference tomain
'Collect2: ld returned 1 exit status make: * * * [test] Error 1
I'm new in the Makefile. I think I missed something obvious.
CodePudding user response:
Obviously, your files are not defined with a signature functionInt main ();
Or
Int main (int arg c, char * argv []);
CodePudding user response:
Praise aIt was less a space