Solved

How do I use libg++?

Posted on 1997-05-29
1
219 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
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 goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

747 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

12 Experts available now in Live!

Get 1:1 Help Now