I have a program written in C. It's directory structure is like this:
root/
program.sh
textures/
texture1.png
program.sh
imports textures in a way like: load_textures("./textures/texture1.png")
(relative paths). Hence, the program only works whenever I execute program.sh
from the root
directory.
I want to create a link to program.sh
such that, whenever I execute the link, I am able to execute the program.sh
from the root directory. In other words, I want to execute program.sh
from outside the root directory.
Now, I would prefer a solution to do this without changing the source code (if there is a way), otherwise, how would you recommend that I open files/textures in C, given the current scenario?
Had a similar question here, but it's unanswered.