CodeLite File Help?

CodeLite installation/troubleshooting forum
ClinicallyInsane
CodeLite Curious
Posts: 2
Joined: Fri May 27, 2016 4:26 am
Genuine User: Yes
IDE Question: C++
Contact:

CodeLite File Help?

Post 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");
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: CodeLite File Help?

Post 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
ClinicallyInsane
CodeLite Curious
Posts: 2
Joined: Fri May 27, 2016 4:26 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite File Help?

Post 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.
You do not have the required permissions to view the files attached to this post.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: CodeLite File Help?

Post 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");
Post Reply