Yes, resource files are Windows specific and I'm not sure how easily you can pass them on to SFML classes.
What we've here been talking about however, is converting an image into C++ code data, which you directly link/include into your application. This also works for any C++ compiler on any platform.
The main confusion on this thread was about the format you'd convert the image into. If you want to use the loadFromMemory function, your data must be a conversion from the binary file. If you want to use the create function, your data must be in the RGBA format.
In my
small application I've used GIMP to generate the header file and then created an image out of it.
Incomplete example:
logo.hpp
#pragma once
#include <SFML/Config.hpp>
static const struct {
sf::Uint32 width;
sf::Uint32 height;
sf::Uint32 bytes_per_pixel; // 2:RGB16, 3:RGB, 4:RGBA
sf::Uint8 data[250 * 43 * 4 + 1];
} IMG_LOGO = {
250, 43, 4,
"\33\32\31\377\33\32\31\377\33\32\31\377\33\32\31\377\33\32\31\377\33\32\31"
"\377\33\32\31\377\33\32\31\377\33\32\31\377\33\32\31\377\33\32\31\377\33"
"\32\31\377\33\32\31\377\33\32\31\377\33\32\31\377\33\32\31\377\33\32\31\377"
"\33\32\31\377\33\32\31\377\33\32\31\377\33\32\31\377\33\32\31\377\33\32\31"
"\377\33\32\31\377\33\32\31\377\33\32\31\377\33\32\31\377\33\32\31\377\33"
// etc.
Application.cpp
#include "logo.hpp"
Application::Application()
{
sf::Image img;
img.create(IMG_LOGO.width, IMG_LOGO.height, IMG_LOGO.data);
m_tex_logo.loadFromImage(img);
// etc.