Author Topic: Using resource files and SFML with codeblocks  (Read 3560 times)

Offline shadowmouse

  • Single posting newcomer
  • *
  • Posts: 5
Using resource files and SFML with codeblocks
« on: January 25, 2015, 06:08:40 pm »
I've been using codeblocks for several years now and SFML for one or two, although I am new to the forums. However I've only ever used resource files for giving my exes icons. Is it possible to put my image files that I am using for my project into a resource file, include it in the project and then reference them with SFML (2.1), and if so, how?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Using resource files and SFML with codeblocks
« Reply #1 on: January 25, 2015, 06:35:32 pm »
I think this a question that the SFML people can answer better. Also check the resource file apis in the msdn or another win32 api help site.

If you find the commands you need to execute in order to get what you want to do then we can probably help you.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline shadowmouse

  • Single posting newcomer
  • *
  • Posts: 5
Re: Using resource files and SFML with codeblocks
« Reply #2 on: January 25, 2015, 06:44:47 pm »
Okay, thanks, I was really asking because I know very little about using resources with codeblocks and I wouldn't know what to write in the resource file, or if there is anything else I have to do to get it to work. And even if I know how to reference resources with SFML, if I can't put them in my codeblocks project then it is pointless

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Using resource files and SFML with codeblocks
« Reply #3 on: January 25, 2015, 08:35:19 pm »
Please read the CB FAQs and re-read the CB Rules.
http://wiki.codeblocks.org/index.php?title=FAQ
http://forums.codeblocks.org/index.php/topic,9996.0.html

You might also want to read the CB Manual and other user Docs.
http://wiki.codeblocks.org/index.php?title=User_documentation

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline shadowmouse

  • Single posting newcomer
  • *
  • Posts: 5
Re: Using resource files and SFML with codeblocks
« Reply #4 on: January 25, 2015, 08:43:46 pm »
Thanks for the reply. I did read the rules and as far as I can tell, this doesn't break them because I am not only asking about using resources in SFML (which was the second part of my question) but I was also asking what the process is to put resources in a codeblocks project and so I believe the question is appropriate. Also, the reason that I came to the forums is that I couldn't find anything about this in either the FAQ or the docs.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Using resource files and SFML with codeblocks
« Reply #5 on: January 26, 2015, 09:33:06 pm »
... I was also asking what the process is to put resources in a codeblocks project and so I believe the question is appropriate...
I don't think there is a need to add the images to the project. As far as I know you just add the .rc file to the project and then codeblocks will execute the proper tool that will embed the resource files that are depicted in the rc file in the final executable.

But this is not a verified knowledge, because I don't use .rc file, nor windows.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]