News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Add pictures to binary

Started by wumbo, August 12, 2009, 01:00:01 PM

Previous topic - Next topic

wumbo

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

GeO

Quote from: wumbo on August 12, 2009, 01:00:01 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

wumbo

Thanks GeO.
But meanwhile I found the solution...

Jenna

Quote from: wumbo on August 12, 2009, 09:03:07 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.