- Gtk#
Just bundle glade files as resources (using the -resource: option in the compiler) and change constructor call or use the Glade.XML.FromAssembly () method to create Glade.XML ui.
See also A google search application using Gtk# - Gtk+(Embedding Binary Blobs With GCC)
- Excerpt From Embedding Binary Blobs With GCC
$ echo Hello, World > foo.txt
$ ld -r -b binary -o foo.o foo.txt
$ objdump -x foo.o
test.c#include <stdio.h>
extern char _binary_foo_txt_start[];
int main (void) {
puts (_binary_foo_txt_start);
return 0;
}
$ gcc -o test test.c foo.o
$ ./test
Hello, World!
Change the string itself in the .data section, which is read/write, to be read-only data in the .rodata section so that it isn't copied for every instance of the application.$ objcopy --rename-section .data=.rodata,alloc,load,readonly,data,contents foo.o foo.o
$ objdump -h foo.o - You might find GNU as's .incbin directive more useful for this purpose - you can control the symbol name, section, and add a NUL terminator. You do have to write little wrapper .s files though. For example
$ echo hello world > demo.txt
$ cat > demo.s
.section ".rodata"
.globl demo
.type demo, @object
demo:
.incbin "demo.txt"
.byte 0
.size demo, .-demo
^D
$ as demo.s -o demo.o
$ nm demo.o
00000000 R demo
$ strings demo.o
hello world
- Excerpt From Embedding Binary Blobs With GCC
- wxWidget(xml-based resource system overview)
- For More, See:
- Add icons to ELF files
How do I add an icon to a mingw-gcc compiled executable?- create a .rc file that looks id ICON "path/to/my.ico"
- windres my.rc -O coff -o my.res
- g++ -o my_app obj1.o obj2.o my.res
0 件のコメント:
コメントを投稿