gotojyh
gotojyh

Reputation: 19

How to use sgi stl in g++

I want to debug SGI STL in g++ (version 4.1.2) I downloaded source code in http://www.sgi.com/tech/stl/download.html and put them in a directory,such as /stl and then g++ -I/stl m.cpp but it causes a lot of complie errs,why?

m.cpp

#include "list" //I want to include **/STL** not **/usr/include/c++/...**
using namespace std
int main()
{return 0;}

Thanks

I just want to debug SGI STL in g++,what should I do?Is this feasible???

Upvotes: 1

Views: 932

Answers (1)

user3125280
user3125280

Reputation: 2829

Gcc looks here (subject to your exact setup)

GCC looks in several different places for headers. On a normal Unix system, if you do not instruct it otherwise, it will look for headers requested with #include in:

 /usr/local/include
 libdir/gcc/target/version/include
 /usr/target/include
 /usr/include

But you can change that easily with g++ -nostdinc -I/stl m.cpp.

The compiler errors are likely cause by the different built in code, but we can't tell without seeing them.

Upvotes: 1

Related Questions