Solved

How do I use libg++?

Posted on 1997-05-29
1
242 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

696 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