Code::Blocks Forums
User forums => General (but related to Code::Blocks) => Topic started by: BigAngryDog on July 11, 2006, 09:00:20 am
-
Hi,
I'm trying to compile an application of mine with GCC on HPUX, but the compiler isn't recognising anything which is STL. I'm getting compiler errors of the like:
Can't open include file 'string'.
Can't open include file 'exception'.
etc...
This isn't a CB question, but before I go around asking the guys in my office (and let everything know the breadth of my ignorance with Unix :) ) I'd thought I'd ask here.
Is there a conditional define, something like "USE_STL" for example, I may need in my project makefile to get GCC to use STL? Or is more likely that STL hasn't been installed with GCC?
Thanks :)
-
A good guess would be to use something that does not occur in 2000 file names (other than "string") and run locate on it. For example locate deque.
If that returns a path, then you add that path to your compiler's include paths. If that does not return anything, then you don't have it. :)
-
Can't open include file 'string'.
I wonder if it works if you don't use include <string>, but include <string.h> or even include "string.h"...?! LCC for example doesn't like <string> so I have to use "string.h" for my projects there allthough this is STL.
-
Thanks for replies. :)
It's lookling like there is there is no STL on machine I'm using.
-
I wonder if it works if you don't use include <string>, but include <string.h>
With gcc, the ".h" STL includes live in the "backwards" subfolder under the location of the "real" includes and they don't really contain anything, they simply emit a warning after including the "real" file.
If you are unable to include <string> then you should not be able to include <string.h> either (wait... actually you will be able to include string.h, there is a C header with that name!)
-
Thanks for replies. :)
It's lookling like there is there is no STL on machine I'm using.
You could always compile STLPort then. I have never done it, but I heard the Ogre project has a nice HOWTO on this (they use STLPort for some compatibility reason). Google on Ogre and STLPort will help :)
-
You should know that gcc != g++. STL is part of g++...
-
I wonder if it works if you don't use include <string>, but include <string.h>
With gcc, the ".h" STL includes live in the "backwards" subfolder [...]
I haven't read "GCC". Sure, for GCC you'll get a backward warning in that case, so forget about my post.
-
Thanks for all the help! :)
>You should know that gcc != g++. STL is part of g++...
OK. I'm learning this. :)
I have discovered that STL is indeed installed on the machine I'm using, but [I think] I need to setup an environment path. As I'm still learning the difference between the c shell and bash shell, I some way to go.
Oh and I love VI!
Cheers :)
-
>You should know that gcc != g++. STL is part of g++...
OK. I'm learning this. :)
What I meant was that you might have gcc installed but not g++. Just another lead :)