godotengine / godotengine/godot-cpp

cannot find _init symbol

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

Description

I've been trying to setup a base native script for godot 3.1 stable on linux using the help provided in docs with a few tiny directory and class name changes. The native module compiles and I've added the native script to autoload but whenever I run the project, godot complains about this error

```
Can't open dynamic library: libnative.so: undefined symbol: _ZN5godot7Example5_initEv
drivers/unix/os_unix.cpp:428 @ open_dynamic_library()
```

And result of `readelf -Ws libnative.so | ag 'Example._init'` is:
```
3: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _ZN5godot7Example5_initEv
3319: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _ZN5godot7Example5_initEv
```

Here are my [sources](http://dpaste.com/2SBK3SV) and [SConstruct](http://dpaste.com/2KJVCGC) file. Also I'm not using custom generated api.json.

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.