godotengine / godotengine/godot-docs
C++ modules: Document how to link to system libraries
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
I am using kde neon ( ubuntu 16.04 derivate )
godot master
I tried adding
```
env_modules.Clone()
env_modules.Append(LIBS=["mylib])
```
to godot/modules/mymodule/SCsub and it did not work
```
[ 24%] Compiling ==> thirdparty/dlib/dlib/all/source.cpp
[ 28%] Compiling ==> modules/motion_sense/facial_landmark.cpp
[ 28%] Compiling ==> modules/motion_sense/register_types.cpp
[ 97%] Linking Program ==> bin/godot.x11.tools.64
modules/libmodules.x11.tools.64.a(facial_landmark.x11.tools.64.o): In function `FacialLandmark::FacialLandmark()':
/home/cheeseburger/godot/modules/motion_sense/facial_landmark.cpp:12: undefined reference to `cv::VideoCapture::VideoCapture(int)'
modules/libmodules.x11.tools.64.a(facial_landmark.x11.tools.64.o): In function `FacialLandmark::~FacialLandmark()':
/home/cheeseburger/godot/modules/motion_sense/facial_landmark.h:9: undefined reference to `cv::VideoCapture::~VideoCapture()'
modules/libmodules.x11.tools.64.a(facial_landmark.x11.tools.64.o): In function `FacialLandmark::~FacialLandmark()':
/home/cheeseburger/godot/modules/motion_sense/facial_landmark.h:9: undefined reference to `cv::VideoCapture::~VideoCapture()'
collect2: error: ld returned 1 exit status
scons: *** [bin/godot.x11.tools.64] Error 1
scons: building terminated because of errors.
```
the result is along the lines of this.
I am wondering if somebody can document that we can use
configure(env) in godot/modules/mymodule/config.py to set up the the required system libraries to link a custom c++ module
Or perhaps link the relevant docs? It kinda difficult to find
I would prefer that linking guide will be added to this doc
http://docs.godotengine.org/en/latest/development/cpp/custom_modules_in_cpp.html
Thank you
hungrymonkey
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.