Mail Archives: djgpp/1997/03/20/10:28:03
On Wed, 19 Mar 1997, Abraham John Kannankeril wrote:
> The program compiled without errors, but while trying to run the program
> it gave us following errors
>
> Error: grph1.o: In function 'main':
> Error: undefined reference to 'initgraph'
> In function 'setcolor(int)':
> undefined reference to '__gr_color'
Did you add -lbcc2 to your link command line? You should put it
*after* all your source/object files but *before* -lgrx20. If you
fail to mention -lbcc2, the linker doesn't search the BCC2GRX library,
and you get undefined references.
If the above doesn't help, post the exact command line that you use to
compile/link your program.
- Raw text -