To: kunst AT prl DOT philips DOT nl, djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP users list) From: Mike Piff Date: 15 Mar 94 11:27:11 Subject: Re: Graphics and C++ Reply-To: Mike Piff %%>From: kunst AT prl DOT philips DOT nl %%>> %%>> I have a program that compilers and runs successfully as a .C program. I %%>> changed it to a .CC program, and tried -lgr_p as a guess, but then I get %%>> undefined reference to 'mcount' lots of times. %%> %%>You guessed wrong ! The *_p.a libraries are used for profiling. %%>Try using the normal libraries: -lgr or -lgrx %%>Make sure to have 'extern "C"' statements around your include files %%>inside your sources to avoid C++ name mangling, just in case... %%>(Most include files have these already, I assume) %%> %%> #ifdef __cplusplus %%> extern "C" { %%> #endif %%> %%> #include (or #include ) %%> %%> #ifdef __cplusplus %%> } %%> #endif %%> %%> %%>> %%>> Any ideas what I am doing wrong? Also, getkey() isn't accepted any more as a %%>> statement. %%>> %%> %%>Try: -lpc %%> I have tried all these suggestions. Two points. 1) In graphics.h, lines 79-84, Blit appears to be declared twice. 2) Program now compiles, but the graphics is in thin vertical strips, and the screen is updated several times. (This is in C++, it is file in C.) Mike Piff %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Dr M J Piff, School of Mathematics and Statistics, University of %% %% Sheffield, UK. e-mail: M DOT Piff AT sheffield DOT ac DOT uk %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%