Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » al_fopen XCode

This thread is locked; no one can reply to it. rss feed Print
al_fopen XCode
bastianjoel
Member #15,888
February 2015

Hey,

somehow my application isn't able to find a txt file. I'm getting "Thread 6: EXC_BAD_ACCESS (code=1, address=0x554485244)"
The file is in a folder within the Supporting Files path and it's a cocoa project in Xcode.

Codeline:
ALLEGRO_FILE *file = al_fopen("rooms/raum0.txt", "r");

Chris Katko
Member #1,881
January 2002
avatar

Did you try:

ALLEGRO_FILE *file = al_fopen("./rooms/raum0.txt", "r"); //note ./

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs

Go to: