I\'ve turned a couple of resource files into .obj files using objcopy
and i link them with my programs source code.
I can very well access the symbols inside th
The trick with objcopy
isn't meant as a full-featured way to embed resources and isn't portable at all, as you have seen.
Microsoft has its own mechanism for resources, so if you're specifically targeting windows, you could use a windows resource file and the RCDATA resource.
If you want something completely portable, your only option is to format the file as C sourcecode like e.g.
const uint8_t my_binary[] = { 0x00, 0x01, ... }
It's straight forward to write your own conversion tool for that.