Fails to build on Ubuntu Linux 14.04 LTS
At work so I can't in a pull request yet.
On the /r/Vulkan thread about this repo, a user mentioned a fix to get this building on Ubuntu Linux 14.04 LTS:
https://www.reddit.com/r/vulkan/comments/47c5mn/vkel_simple_dynamic_vulkan_extension_loader/d0bxjbe
Specifically, it just needs to include:
#include <dlfcn.h>
and then use this command to build:
gcc -std=c99 -fPIC -shared -o libvkel.so vkel.c
Much appreciated! I knew there was something I overlooked.
Here is the output from gcc when building without the -std=c99 flag:
$ gcc -fPIC -shared -o libvkel.so vkel.c
vkel.c: In function ‘vkelIsSupported’:
vkel.c:158:4: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (uint32_t i = 0; i < count; i++)
^
vkel.c:158:4: note: use option -std=c99 or -std=gnu99 to compile your code
Here is the output from gcc when building without the -fPIC flag:
$ gcc -std=c99 -shared -o libvkel.so vkel.c
/usr/bin/ld: /tmp/ccsTRZmQ.o: relocation R_X86_64_32S against `.rodata' can not be used
when making a shared object; recompile with -fPIC
/tmp/ccsTRZmQ.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
I'll look into it, I'm in the process of rewriting vkelIsSupported, as it kinda doesn't differentiate between instance and device.