if(($ACT == 'edit' || $ACT == 'preview') && $INFO['editable']){ ?> } else { ?> } ?>
This shows you the differences between two versions of the page.
wiki:embedding_resources_in_executables [10.01.2018 15:51] rgareus [Alternative option using asm] |
wiki:embedding_resources_in_executables [10.01.2018 15:57] (current) rgareus [Alternative option using asm] |
||
---|---|---|---|
Line 172: | Line 172: | ||
_my_data_size: dd $-_my_data | _my_data_size: dd $-_my_data | ||
- | and compile it with `nasm -felf64 resource.s -o resource.o`. The data can then be referenced using | + | and compile it with `''nasm -felf64 resource.s -o resource.o''` (Note that ''-felf64'' here is Linux 64bit. The options needs to be replaced with the corresponding target architecture and OS). |
+ | |||
+ | The data can then be referenced using | ||
extern const unsigned char _my_data[]; | extern const unsigned char _my_data[]; | ||
- | in gcc. MSVC does not need the leading underscore in c-code and one can reference it using `my_data`. | + | with gcc. MSVC does not need the leading underscore in c-code and one can reference it using ''my_data''. |
{{tag>development article}} | {{tag>development article}} |