Topic was automatically imported from the old Question2Answer platform.
Asked By
ihsan
Hello everyone.
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:
I got it working!
You are correct that leaving out both -rdynamic and -Wl,--export-all-symbols seems to work just fine on Windows.
The problem was actually in my main.gd script and had nothing to do with my compilation steps. All this time I thought that the symbols weren’t getting exported correctly because I was using some wrong combination of options on the command line. I feel so embarrassed right now. Thank you so very much for the help though! I really appreciate it.