diff options
| author | Thomas Herzog <thomas.herzog@mail.com> | 2017-10-03 17:53:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-03 17:53:24 +0200 |
| commit | f24ecfc74d2f60c597cef6d98e23accfb358a90e (patch) | |
| tree | c3d22238e892b153c32cdeda56c3f648bab36d72 | |
| parent | b32b9422abd60238b1df6936e6b1adb9dac72e66 (diff) | |
| parent | 50dec32bdac3729ba14aef4c786561d86b31859a (diff) | |
| download | redot-cpp-f24ecfc74d2f60c597cef6d98e23accfb358a90e.tar.gz | |
Merge pull request #43 from RameshRavone/patch-8
Updated README
| -rw-r--r-- | README.md | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -28,13 +28,13 @@ Edit `SConstruct` file and assign your godot executable path at line:7 `godot_bi Building cpp_bindings ``` -$ scons p=linux +$ scons godotbinpath="../godot_fork/bin/" headers="../godot_headers/" p=linux generate_bindings=yes ``` resulting libraries will be placed under `bin/` and the generated headers will be placed under `include/*` -Note: - Using `generate_bindings=yes` you can generate `godot_api.json` (Godot API) - Use `use_llvm=yes` to use clang++. +**Note:** +> `generate_bindings=yes` is used to generate C++ bindings (`godot_api.json` - Godot API) +> Include `use_llvm=yes` for using clang++ Copy binding libraries into the `SimpleLibrary/lib` folder ``` @@ -84,6 +84,9 @@ public: * export var _name = "SimpleClass" **/ register_property((char *)"base/name", &SimpleClass::_name, String("SimpleClass")); + + /** For registering signal **/ + // register_signal<SimpleClass>("signal_name"); } String _name; @@ -108,7 +111,7 @@ NATIVESCRIPT_INIT() { # Compiling ``` $ cd .. -$ clang -fPIC -o src/init.os -c src/init.cpp -g -O3 -std=c++14 -Icpp_bindings/include -Igodot_headers -Icpp_bindings/include/ +$ clang -fPIC -o src/init.os -c src/init.cpp -g -O3 -std=c++14 -Icpp_bindings/include -Igodot_headers $ clang -o lib/libtest.so -shared src/init.os -Llib -lgodot_cpp_bindings ``` This creates the file `libtest.so` in your `SimpleLibrary/lib` directory. For windows you need to find out what compiler flags need to be used. |
