Page 1 of 1
CodeLite File Help?
Posted: Fri May 27, 2016 5:02 am
by ClinicallyInsane
I installed CodeLite today, and I want to load certain assets into my program but it wants the files to be in the debug folder.
Is there a way to set it up so I can call it in this fashion:
m_Font.loadFromFile("Media/Fonts/arial.ttf");
Re: CodeLite File Help?
Posted: Fri May 27, 2016 1:17 pm
by DavidGH
Hi,
You don't supply much information about your system or program, but IIUC that line is in your program's code, not in CodeLite code or generated code or... If so, at least in Linux, you can make it work by changing (with code) the current working directory to the parent directory of Media/.
If my understanding
is correct, it's nothing to do with CodeLite. However you run any program, it will have a
default current directory.
Regards,
David
Re: CodeLite File Help?
Posted: Fri May 27, 2016 10:05 pm
by ClinicallyInsane
Hey,
Sorry I left out some information, I have windows 7 32 bit. CodeLite is the latest stable version that is available for 32 bit. I will post a picture that will hopefully help explain what I mean. SFML is my current project I am working on, I cannot get it to read this as my current layout it will not load any of the media, unless I physically place the files into the debug folder. I am a neat freak and want to keep them in their own folder and not inside the debug folder.
Tree.PNG
Thanks.
Re: CodeLite File Help?
Posted: Fri May 27, 2016 11:29 pm
by DavidGH
Have you tried, in your code, setting the correct current working directory? I can't tell you what native Windows command would do that (though I'm sure google could) but if you're using wxWidgets, the toolkit that CodeLite is built with, it would be:
wxSetWorkingDirectory("C:/SFML");