godot-cpp: I dont have a Reference.hpp?
I’m trying to setup GDNative-demos with cpp, figured to ask here instead of there since Reference.hpp seems to be something provided by this repo.
I have generated the cpp_bindings according to the README.md. Platform is linux, and I pulled this repo from commit 94ec3119240461831a46264f1465a515070706c7
ayaka@DESKTOP-33AK5VQ:/mnt/c/Users/Ayaka/Documents/GDNative-demos/cpp/kinematic_character/Script$ scons
platform=linux
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o src/colworld.os -c -g -O3 -std=c++14 -Wno-writable-strings -fPIC -Isrc/godot_headers -Isrc/cpp_bindings/include -Isrc/cpp_bindings/include/core -Isrc src/colworld.cpp
In file included from src/cpp_bindings/include/core/Godot.hpp:13:0,
from src/colworld.h:20,
from src/colworld.cpp:17:
src/cpp_bindings/include/core/Ref.hpp:6:28: fatal error: ../Reference.hpp: No such file or directory
compilation terminated.
scons: *** [src/colworld.os] Error 1
scons: building terminated because of errors.
Doing find . -name Reference.hpp
came up blank as well.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 24 (5 by maintainers)
Yep, what you suggested works. Maybe this is a good time to update the README before more issues like mine pop up around here.
you don’t need the godotbinpath anymore but what you do need is
generate_bindings=yes
, otherwise it won’t generate the file@atsuzaki original question I believe has been answered and the current readme in master has been updated to reflect a working example and inform about the different branches, so I’m closing this issue as resolved. Thanks for the discussion everyone!
Yes, if you want to build a GDNative module that works in 3.0 and 3.1 you need to use the 3.0 branch and follow the much older instructions.
The master of godot-cpp is Godot 3.1 only
I had to include “include/core”, “include/gen” and “include/” because some of the .hpp files in “/core” use
#include <core/*.hpp>
With that
scons platform=linux
worked. the clang compilations still didn’t work though.