News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

STL with GCC on HPUX

Started by BigAngryDog, July 11, 2006, 09:00:20 AM

Previous topic - Next topic

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 :)
[url="//bigangrydog.com"]BigAngryDog.com[/url]

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. :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

MortenMacFly

Quote from: BigAngryDog on July 11, 2006, 09:00:20 AM
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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

BigAngryDog

Thanks for replies. :)

It's lookling like there is there is no STL on machine I'm using.
[url="//bigangrydog.com"]BigAngryDog.com[/url]

thomas

#4
QuoteI 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!)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

thomas

Quote from: BigAngryDog on July 11, 2006, 09:41:20 AM
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 :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

mandrav

You should know that gcc != g++. STL is part of g++...
Be patient!
This bug will be fixed soon...

MortenMacFly

Quote from: thomas on July 11, 2006, 09:48:49 AM
QuoteI 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

BigAngryDog

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 :)
[url="//bigangrydog.com"]BigAngryDog.com[/url]

mandrav

Quote from: BigAngryDog on July 11, 2006, 12:59:09 PM
>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 :)
Be patient!
This bug will be fixed soon...