Solved

How do I use libg++?

Posted on 1997-05-29
1
224 Views
Last Modified: 2012-05-04
I have the most recent g++ compiler and libg++ on my Linux system.  I want to use the classes described in the documentation such as stacks and queues.  There are header files in /usr/include/g++ such as stack.h.  However, when I put

#include <stack.h>
stack stk;

into my program, I get a parsing error on the second line.  Furthermore, there is a /usr/include/g++/gen directory with a lot of .ccP and .hP files.  I think that these files actually have the classes that I want to use.

How can I use these classes?  

Thanks in advance!

Jeff Shirer
0
Comment
Question by:jshirer
1 Comment
 

Accepted Solution

by:
Morgoth earned 50 total points
ID: 1163746
Try typing -lg++ as a parameter when you compile, other than that, I can only guess that perhaps you haven't set it up properly(the directory structure).

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now