BenScar
What does this do again?
Hello all,
After much help from MadDog and Slygamer, I've managed to get my Visual Studio set up to complie for the GP2x. Going though the "Lazy Foo' Productions" SDL tutorial and I've hit a problem on the first example! I feel like a total newbie (which isn't to far off...)
With this piece of code I get some errors on complie:
That's not all of it, it's just the parts causing me the (current) errors.
To start with it's telling me
I believe this is causing the next two errors:
As the "filename" variable isn't being worked out properly I assume this then gives the next error about the variable being "undeclared", which seems fair.
So, can anyone point out what I'm doing wrong? I've played with it, teased it, mis-spelt things on purprose to try and trick the complier/linker all to no avail. Been though my "Dummies Guide to C++" and can't see why it's not finding the <sting> include file...
Starting to think someone out there doesn't want me making a noughts and crosses program for my 2x!
After much help from MadDog and Slygamer, I've managed to get my Visual Studio set up to complie for the GP2x. Going though the "Lazy Foo' Productions" SDL tutorial and I've hit a problem on the first example! I feel like a total newbie (which isn't to far off...)
With this piece of code I get some errors on complie:
Code:
#include "SDL/SDL.h"
#include <string>
SDL_Surface *load_image( std::string filename )
{
To start with it's telling me
The error log tells me this is the "<string>" one that it can't find. If I change this to <string.h> it'll find the include file, sadly this doesn't rid me of any other of the errors. I thought this was happening as it's not the "usual" complier doing the work but the ARM one. So I copied the includes to a specific place and named it as one of the "Additional Include Paths". This had no effect.Error 1 error: string: No such file or directory
I believe this is causing the next two errors:
The "std::string filename" part won't work anyway I try it, remove the "std::" and it gives me simply "syntax error before 'filename'"Error 2 error: syntax error before ':' token
Error 3 error: 'filename' undeclared (first use in this function)
As the "filename" variable isn't being worked out properly I assume this then gives the next error about the variable being "undeclared", which seems fair.
So, can anyone point out what I'm doing wrong? I've played with it, teased it, mis-spelt things on purprose to try and trick the complier/linker all to no avail. Been though my "Dummies Guide to C++" and can't see why it's not finding the <sting> include file...
Starting to think someone out there doesn't want me making a noughts and crosses program for my 2x!