Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: shadowmouse on January 25, 2015, 06:08:40 pm

Title: Using resource files and SFML with codeblocks
Post by: shadowmouse 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?
Title: Re: Using resource files and SFML with codeblocks
Post by: oBFusCATed 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.
Title: Re: Using resource files and SFML with codeblocks
Post by: shadowmouse 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
Title: Re: Using resource files and SFML with codeblocks
Post by: stahta01 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://wiki.codeblocks.org/index.php?title=FAQ)
http://forums.codeblocks.org/index.php/topic,9996.0.html (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 (http://wiki.codeblocks.org/index.php?title=User_documentation)

Tim S.
Title: Re: Using resource files and SFML with codeblocks
Post by: shadowmouse 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.
Title: Re: Using resource files and SFML with codeblocks
Post by: oBFusCATed 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.