работаю с gtk+-2.0, необходимо картинки хранить не отдельно от exe модуля, а в нем, но в gtk+-2.0 таких возможностей нету. Подскажите как сделать? или куда копать...
По поводу xpm несложно нагуглить.
А если надо произвольный бинарный файл прошить,
то вот побыстрому на бросал (примерно так это в qt делается):
Можно за основу взять.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#define COLS 10
int main(int argc, char **argv)
{
int i,b,fd;
struct stat st;
unsigned char *buf;
if (argc < 2)
return -1;
fd = open(argv[1],O_RDONLY);
if (!fd)
fprintf(stderr,"Can't open file");
if (fstat(fd,&st) != 0)
fprintf(stderr,"fstat error");
buf = malloc(st.st_size);
if (read(fd,buf,st.st_size) < st.st_size)
fprintf(stderr,"i/o error");
close(fd);
printf("static const unsigned char file_data[] = {\n");
b = 0;
for (i = 0; i < st.st_size; ++i) {
++b;
printf("0x%02x",buf[i]);
if ( i != st.st_size - 1){
printf(",");
}
if (b == COLS) {
printf("\n");
b = 0;
}
}
printf("};");
free(buf);
return 0;
}