SDL, cross-platform codin, iostream... help

Discussion in 'Mac Programming' started by kaziorvb, Aug 16, 2007.

  1. kaziorvb macrumors newbie

    Aug 16, 2007

    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?
  2. kaziorvb thread starter macrumors newbie

    Aug 16, 2007

    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

Share This Page