or add to file names always absolute paths containing the subfolder name like "images\\yourpicture.jpg". can be simple to use this approach if you store in strings your subfolders, and use:
str_cpy( actualfilename , foldername );
str_cat( actualfilename , filename );
this way the compilation will result also in a cd folder without subfolders, but if you copy/move the exe and the dlls to your script folder it will work fine (normally the exe is also placed to script folder).