Using SGI extension, how to ?

F

Fab

Hi !

Please how to compile a program that uses an STL SGI extension like
slist or hash_map ?

For example, I'm unable to compile this example anymore :
http://www.sgi.com/tech/stl/Slist.html
I compiled it succesfully last year but I'm unable to remember
required #includes #define or namespace to use.

Moreover, the compiler on my linux has changed :
gcc version 4.2.3 20071123 (prerelease) (Debian 4.2.2-4)

Useful installed Debian packages are :
libstdc++6-4.2-dev
and
libstlport5.1-dev

the later owns :
/usr/include/stlport/slist

If I put these lines :
#include <stlport/slist>
#include <iostream>
using namespace std;

before the stl-manual example,

the compiler find "slist" include but not :
_stl/prolog.h
,
stl/_slist.h
and
stl/_epilog.h
that are included in stlport/slist.

Sure I've missed something huge : probably need to declare I want to
use SGI extension, but how ?

Thanks for any light.

Fabrice
 
F

Fab

I forgot to say that the compilation issue will naturally arise
because :
<stlport/slist>
includes
<stl/_prolog.h>, <stl/_slist.h> and <stl/_epilog.h>

but <stl/_prolog.h>, <stl/_slist.h> and <stl/_epilog.h> aren't
located in
<stl/...> i.e. : /usr/include/stl/
but in
/usr/include/stlport/stl/
 
F

Fab

Replying to myself :

adding -I /usr/include/stlport for g++ command lines in Makefile
solves the problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top