delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/21/22:27:00

From: j DOT aldrich6 AT genie DOT com
Message-Id: <199606220220.AA240500015@relay1.geis.com>
Date: Sat, 22 Jun 96 01:56:00 UTC 0000
To: jepigar AT prolog DOT net
Cc: djgpp AT delorie DOT com
Mime-Version: 1.0
Subject: Re: Information on Libgpp

Reply to message 6206929    from JEPIGAR AT PROLO on 06/21/96 11:38AM


>I've downloaded libgpp, and installed it and everything.  I only have
>one question, that is what is it used for.  Sorry if this sounds
>newbie, but I'm confused.  Do I have to link it to use C++?  Or can I
>get by without it?  For disk space and the like.  Any info would be
>appreciated.  Thank you.

Before I give you an answer, I have a question for you:  You have
downloaded and installed the _entire_ DJGPP package, right?  By
entire, I mean at least the packages djdev200.zip, gcc272b.zip,
bnu252b,zip, gpp272b.zip, lgp271b.zip, and csdpmi1b.zip.  DJGPP will
not work if you just grabbed some of its files piecemeal.  For more info
on this, see the file readme.1st that can be found with the DJGPP files.

Now, with that out of the way, yes, you need the libgpp.a library to
compile C++ code.  Libraries contain the actual code for the functions
and classes that you call in your programs.  Without these, the
compiler can't find the information it needs.  To ensure that libgpp.a
gets linked by the compiler, you have to do one of two things.

Add '-lgpp' to the end of your gcc command line, like so:

gcc -Wall -o foo.exe foo.c -lgpp

Or you can use 'gxx', which does this for you and is included in any
gcc272b.zip dated Feb. 22 or later.

I also suggest a book or class on C/C++ programming, as you seem
to be struggling a bit.  :)

John

- Raw text -


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