User forums > Help

Add pictures to binary

(1/1)

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 )?

--- End quote ---
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...

--- End quote ---
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.

Navigation

[0] Message Index

Go to full version