iostream, string, sstring won't include

support for the powerpc toolchain
Post Reply
Stephen
Posts: 2
Joined: Sun Mar 27, 2011 3:02 am

iostream, string, sstring won't include

Post by Stephen » Sun Mar 27, 2011 4:40 am

I'm not sure if devkitPro is supposed to have these (iostream, string, sstring) included with the install. I asked several people in the GRRLIB irc and some of them said it should work and some said that these aren't included.

When I try #include <iostream>, string, or string, it says couldn't find the file:

Code: Select all

fatal error: iostream: No such file or directory
Are these files supposed to come with devkitPro or am I supposed to get them from somewhere else and link them in somehow?

P.S. I'm really sorry if this is in the wrong section, I didn't see a general devkitPro help section.

WinterMute
Site Admin
Posts: 1861
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: iostream, string, sstring won't include

Post by WinterMute » Sun Mar 27, 2011 2:53 pm

There's no general devkitPro help section because devkitPro is a toolchain vendor, we produce several toolsets - devkitARM, devkitPSP and devkitPPC. What you're using is devkitPPC (and I only know that because you mentioned GRRLIB).

The compiler can't find these includes because you're compiling C code.

Clean your project, rename your source files from .c to .cpp and recompile.
Help keep devkitPro toolchains free, Donate today

Personal Blog

User avatar
Izhido
Posts: 107
Joined: Fri Oct 19, 2007 10:57 pm
Location: Costa Rica
Contact:

Re: iostream, string, sstring won't include

Post by Izhido » Mon Mar 28, 2011 4:12 pm

Just to clarify a little on what WinterMute said: The current toolchain(s), with the default makefiles, ask specifically for C++ code to be inside a file with a .cpp extension, while C code must be in a file with a .c extension. Header files are not restricted to a specific extension name, though.

We're aware some compilers/IDEs/toolchains do not demand such an arrangement, but these ones do.

Hope that helps.

Stephen
Posts: 2
Joined: Sun Mar 27, 2011 3:02 am

Re: iostream, string, sstring won't include

Post by Stephen » Wed Apr 06, 2011 8:46 pm

Ah i see! Thanks! That helps a LOT!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests