Fix gcc compilation flags for GDNative with C example

`-rdynamic` flag is needed to properly export the symbols (otherwise Godot may not find them).

Also changed to use the more common `.o` extension for objects on Linux.
This commit is contained in:
George Marques
2020-01-22 15:15:31 -03:00
committed by GitHub
parent 98bcb8af4a
commit c7bc8c7bcd

View File

@@ -361,8 +361,8 @@ On Linux:
.. code-block:: none
gcc -std=c11 -fPIC -c -I../../godot_headers simple.c -o simple.os
gcc -shared simple.os -o ../bin/libsimple.so
gcc -std=c11 -fPIC -c -I../../godot_headers simple.c -o simple.o
gcc -rdynamic -shared simple.o -o ../bin/libsimple.so
On macOS: