|Topic was automatically imported from the old Question2Answer platform.
I’ve been working through the GDNative C example tutorial in the documentation and I’m having trouble compiling the module. I am using a Windows computer and MinGW-W64 (msys2). I’m new to GCC, and DLLs in general, so please forgive me if this is a stupid question.
The -rdynamic option isn’t recognized in this environment, and trying to compile with that option fails, so I tried to use -Wl,–export-all-symbols instead. There are no errors after that, however, when I run the project and click the button, I get the error “Invalid call. Nonexistent function ‘get_data’ in base 'NativeScript”.
These are the exact commands that I have used to compile the project:
gcc -std=c11 -fPIC -c -I../godot_headers simple.c -o simple.o
gcc -Wl,--export-all-symbols -shared simple.o -o ../simple/bin/libsimple.dll
What could be going wrong here?