From: Paul Harness Subject: Re: Graphics and C++ To: M DOT Piff AT sheffield DOT ac DOT uk Date: Wed, 16 Mar 1994 11:06:47 +0000 (GMT) Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp) > The following file does not compile for me. I include my environment and also > the output of gcc. > > Mike Piff > > > TEST.CC > > #ifdef __cplusplus > extern "C" { > #endif > > #include > #include > #include > > #ifdef __cplusplus > } > #endif > > main() > {} > You don't need the extern "C" statements here as they are already included in the include files. Try compiling: #include #include #include main() { GrSetMode(GR_default_graphics); GrLine(0,0,GrMaxX(),GrMaxY(),GrWhite()); getkey(); GrSetMode(GR_default_text); return 0; } with gcc -Wall filename.cc -lgpp -lm -lpc -- Paul Harness, | Internet: gapa83 AT udcf DOT gla DOT ac DOT uk Department of Physics and Astronomy, | University of Glasgow, | Tel +44-41-339-8855 ext 8359 Glasgow, G12 8QQ, SCOTLAND. | Fax +44-41-334-9029