Code::Blocks Forums

User forums => Help => Topic started by: wumbo on August 12, 2009, 01:00:01 pm

Title: Add pictures to binary
Post by: wumbo on August 12, 2009, 01:00:01 pm
Hi folks,

I am programming with wxWidgets and Codeblocks on Ubuntu.
I have added some pictures to my project and codeblocks uses relative file paths to them.
Of course this doesn´t work anymore if I move my binary. So I´ve got two questions:

1.How can I make codeblocks use absolute file paths for loading pictures?
2.Is there any option that codeblocks adds the pictures to the binary file ( So that I don´t have to load them externally )?

Thanks for your help guys!

With kind regards,
Wumbo
Title: Re: Add pictures to binary
Post by: GeO on August 12, 2009, 07:36:34 pm
2.Is there any option that codeblocks adds the pictures to the binary file ( So that I don´t have to load them externally )?
http://wiki.wxwidgets.org/Embedding_PNG_Images (http://wiki.wxwidgets.org/Embedding_PNG_Images)
Title: Re: Add pictures to binary
Post by: wumbo on August 12, 2009, 09:03:07 pm
Thanks GeO.
But meanwhile I found the solution...
Title: Re: Add pictures to binary
Post by: Jenna on August 12, 2009, 09:16:46 pm
Thanks GeO.
But meanwhile I found the solution...
Would be nice in such cases to post that you found the solution, so that other user don't try to find it for you.

By the way the using absolute paths for loading anything to your application makes it absolutely unusable on systems with a different directory layout.

And the question is not related to C::B and therefore violating our forum rules.