godotengine / godotengine/godot-cpp

Importing code in editor fails with "undefined symbol error"

Open
#357 6 comments 4 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.7k
Forks
809
Avg merge
1d 3h
Merged PRs (30d)
8

Description

Hello,
I've been following exactly this https://docs.godotengine.org/en/3.1/tutorials/plugins/gdnative/gdnative-cpp-example.html C++ Gdnative tutorial. Back when I was using Windows 10 it worked fine, but now I am on Ubuntu 18.04 and it doesn't work.
The code (exactly the one used in the tutorial) compiles without any problem; however, when I try to import the libs into Godot, I get those errors :

`Can't resolve symbol godot_gdnative_init. Error: /home/thefamousrat/Documents/Godot/test/src/bin/x11/libgdexample.so: undefined symbol: godot_gdnative_init
modules/gdnative/gdnative.cpp:347 - Failed to obtain godot_gdnative_init symbol
modules/gdnative/gdnative.cpp:488 - No valid library handle, can't get symbol from GDNative object
modules/gdnative/nativescript/nativescript.cpp:1504 - No nativescript_init in "res://src/bin/x11/libgdexample.so" found`

Anyone has any inputs on this ? I've seen this error pop up for other persons on Linux. I'm using Godot 3.1.2 and the latest Godot-cpp/godot_headers repos (I tried using the nativescript-1.1 branch, but to no avail).

Thank you

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.