Apr 22, 2010 at 10:35pm UTC
Hello...
I tried using getCurrentDirectory to load a sub folder of my program... but it just says
1 2
app.cpp: In function ‘bool load_files()’:
app.cpp:207: error: ‘getCurrentDirectory’ was not declared in this scope
here is my code...
1 2 3 4 5 6
getCurrentDirectory ( "./images/char" );
dot = load_image ( "dot.bmp" );
getCurrentDirectory ( "./images/grounds" );
block1 = load_image ( "block1.bmp" );
getCurrentDirectory ( "./images/fonts" );
font = TTF_OpenFont ( "lazy.ttf" , 20 );
and if its an include problem then here are my headers...
1 2 3 4 5 6 7 8
#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include "SDL/SDL_ttf.h"
#include <string>
#include <sstream>
#include <vector>
#include <cmath>
using namespace std;
Im on Ubuntu 10.04 and i am using g++ ( terminal ) to compile
ty in advance!
Last edited on Apr 22, 2010 at 10:46pm UTC
Apr 22, 2010 at 11:06pm UTC
1. It's GetCurrentDirectory(), not getCurrentDirectory().
2. Those calls don't match the function signature:
DWORD GetCurrentDirectory(DWORD nBufferLength,LPTSTR lpBuffer);
3. It's a Windows function.