delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/03/15/05:59:04

From: kunst AT prl DOT philips DOT nl
Subject: Re: Graphics and C++
To: M DOT Piff AT sheffield DOT ac DOT uk
Date: Tue, 15 Mar 1994 11:28:19 +0100 (MET)
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP users list)

> 
> 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 <graphics.h> (or #include <grx.h>)

  #ifdef __cplusplus
  }
  #endif


> 
> Any ideas what I am doing wrong? Also, getkey() isn't accepted any more as a
> statement.
> 

Try: -lpc

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019