View Full Version : SDL, cross-platform codin, iostream... help

Aug 16, 2007, 02:34 AM

i began codin in xcode using sdl library. found lotsa tutorials, but mostly for windows... i found out how to init sdl stuff, display images, even wrote simple game.. but from the beginnin - i couldnt use std::string, std's at all and i couldnt #include <iostream>. now it came to open external files and every tut shows how to do it with fstream, sstream and iostream but i cant do it..

also, will i be able to port my stuff to windows easily? ive tried mixing 2 projects - c++ commandline utility (where i can use iostream) and sdl application. i failed. also ive seen it uses mac os x 10.4u sdk so wouldnt be there any probs porting?

had to use char* instead of string.. ok, happens, but now i really want to use fstream, iostream, sstream and all the stuff ;s

anyone succeeded setting up a REAL sdl programming platform on mac?

Aug 16, 2007, 10:06 AM

the solution was so simple... i only had to rename main.c to main.cpp - just because iostream, fstream, etc are typical c++ libs...

its all the sdl project template's fault ;p