Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Problem with resourcePath()  (Read 736 times)

0 Members and 1 Guest are viewing this topic.

Kladdy

  • Newbie
  • *
  • Posts: 12
    • View Profile
Problem with resourcePath()
« on: January 16, 2015, 09:48:47 pm »
First of: I'm using Mac OS X 10.10.1 and Xcode 6.1.1.

Hello! I'm creating a program, and I need to use some shell to copy a file from a place to another. I get the pat of the file by doing
(resourcePath() + "files/buddyPanelAssets.swf")
. I'm also using this resourcePath  in the beginning of the code, to load fonts and textures etc. It looks like this
(resourcePath() + "segoeuil.ttf")

It works perfectly fine to load resources in the beginning, but once i use it in the middle of the code (in an if statement in this case) it returns this random crap. I used
cout << resourcePath() << endl;
to print the path, and I get this:
/Users/Sigge/Library/Developer/Xcode/DerivedData/CustomLoL-bdottywdqngdlwexzprwwdwfpyyx/Build/Products/Debug/CustomLoL.app/Contents/Resources/

This looks like the path that the build is running from, but i could be wrong.

What could be causing this? I know i could create a variable in the beginning and initialize it there and set it, and use it later. But I just want to know if something is wrong. Thanks!

 

anything