SDL Wiki
[ front page | index | search | recent changes | git repo | offline html ]

CategoryDlopenNotes

This header allows you to annotate your code so external tools know about dynamic shared library dependencies.

If you determine that your toolchain doesn't support dlopen notes, you can disable this feature by defining SDL_DISABLE_DLOPEN_NOTES. You can use this CMake snippet to check for support:

 set(CHECK_ELF_DLNOTES_SRC [==[
 #ifndef __ELF__
   ELF DL notes is only supported on ELF platforms
 #endif
 __attribute__ ((used,aligned(4),section(".note.dlopen"))) static const struct {
   struct { int a; int b; int c; } hdr; char name[4]; __attribute__((aligned(4))) char json[24];
 } dlnote = { { 4, 0x407c0c0aU, 16 }, "FDO", "[\\"a\\":{\\"a\\":\\"1\\",\\"b\\":\\"2\\"}]" };
 int main(int argc, char *argv[]) {
   return argc + dlnote.hdr.a;
 }
 ]==])
 check_c_source_compiles("${CHECK_ELF_DLNOTES_SRC}" COMPILER_SUPPORTS_ELFNOTES)
 if(NOT COMPILER_SUPPORTS_ELFNOTES)
   set(SDL_DISABLE_DLOPEN_NOTES TRUE)
 endif()

Functions

Datatypes

Structs

Enums

Macros


CategoryAPICategory


[ edit | delete | history | feedback | raw ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.