User forums > General (but related to Code::Blocks)

STL with GCC on HPUX

(1/2) > >>

BigAngryDog:
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 :)

thomas:
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. :)

MortenMacFly:

--- Quote from: BigAngryDog on July 11, 2006, 09:00:20 am ---Can't open include file 'string'.

--- End quote ---
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.

BigAngryDog:
Thanks for replies. :)

It's lookling like there is there is no STL on machine I'm using.

thomas:

--- Quote ---I wonder if it works if you don't use include <string>, but include <string.h>
--- End quote ---
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!)

Navigation

[0] Message Index

[#] Next page

Go to full version