godotengine / godotengine/godot-docs

Document how to use rpath/LD_LIBRARY_PATH with GDNative

Open
#2,443 2 comments 0 reactions 0 assignees View on GitHub
area:manual enhancement
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

first, my english may not good enough so be patient plz
problem:
my flow tutorial: [GDNative C++ example](https://docs.godotengine.org/en/3.1/tutorials/plugins/gdnative/gdnative-cpp-example.html)
i try make c++ plugin which include opencv. Everything work find, i can compile libgdexample.so.
my opencv shared lib located at: /opt/opencv/lib
now is crazy time:
1. try plugin without any opencv code = > work find
2. set tiny code: cv::Mat test; in init method => /libgdexample.so. Error: libopencv_imgcodecs.so.4.1: cannot open shared object file: No such file or directory
3. export RPATH=path/to/opencvlib, re-try again => still cant find shared lib opencv
4. turn of godot (my godot run from steam), re-open by call executable from terminal => it work
5. export project to executable file => it still require run from terminal, if not, library not found again
All my work on ubuntu 18.04 and godot 3.1

any one know how to run executable directly (double click on run file) ?

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.