Author Topic: Add pictures to binary  (Read 3581 times)

Offline wumbo

  • Single posting newcomer
  • *
  • Posts: 7
Add pictures to binary
« 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

Offline GeO

  • Multiple posting newcomer
  • *
  • Posts: 51
Re: Add pictures to binary
« Reply #1 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

Offline wumbo

  • Single posting newcomer
  • *
  • Posts: 7
Re: Add pictures to binary
« Reply #2 on: August 12, 2009, 09:03:07 pm »
Thanks GeO.
But meanwhile I found the solution...

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Add pictures to binary
« Reply #3 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.