Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to build godot-svgsprite library #6

Open
stebulba opened this issue Sep 8, 2023 · 2 comments
Open

Impossible to build godot-svgsprite library #6

stebulba opened this issue Sep 8, 2023 · 2 comments

Comments

@stebulba
Copy link

stebulba commented Sep 8, 2023

I am on Ubuntu 22.04

command: scons platform=linux target_name=libgodot-svgsprite target=release
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o cpp/src/svgsprite.os -c -fPIC -g -O3 -std=c++17 -fPIC -Icpp/godot-cpp/godot-headers -Icpp/godot-cpp/include -Icpp/godot-cpp/include/core -Icpp/godot-cpp/include/gen -Icpp/src -Icpp/lunasvg/include -Icpp/lunasvg/3rdparty/plutovg -Icpp/lunasvg/3rdparty/software cpp/src/svgsprite.cpp
cpp/src/svgsprite.cpp: In member function 'void godot::SVGSprite::set_svg_file(godot::String)':
cpp/src/svgsprite.cpp:187:30: error: ambiguous overload for 'operator=' (operand types are 'godot::Ref<godot::Texture>' and 'std::nullptr_t')
  187 |         _ref_prerasterized = nullptr;
      |                              ^~~~~~~
In file included from cpp/godot-cpp/include/core/Godot.hpp:42,
                 from cpp/src/svgsprite.h:4,
                 from cpp/src/svgsprite.cpp:1:
cpp/godot-cpp/include/core/Ref.hpp:109:14: note: candidate: 'void godot::Ref<T>::operator=(const godot::Ref<T>&) [with T = godot::Texture]'
  109 |         void operator=(const Ref &p_from) {
      |              ^~~~~~~~
cpp/godot-cpp/include/core/Ref.hpp:126:14: note: candidate: 'void godot::Ref<T>::operator=(const godot::Variant&) [with T = godot::Texture]'
  126 |         void operator=(const Variant &p_variant) {
      |              ^~~~~~~~
scons: *** [cpp/src/svgsprite.os] Error 1
scons: building terminated because of errors.

@heppocogne
Copy link
Owner

I'm sorry but I can't test build on linux environment.
What happen if you change _ref_prerasterized = nullptr; to _ref_prerasterized = Ref<ImageTexture>();?

@stebulba
Copy link
Author

I'm sorry but I can't test build on linux environment. What happen if you change _ref_prerasterized = nullptr; to _ref_prerasterized = Ref<ImageTexture>();?

Yes that work. But I got a new error. I have no time to figure that for now.

godot-svgsprite$ scons platform=linux target_name=libgodot-svgsprite target=release
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o bin/x11/libgodot-svgsprite-release.so -shared cpp/src/rawsvg_loader.os cpp/src/svgsprite.os cpp/src/gdlibrary.os -Lcpp/godot-cpp/bin -Lcpp/lunasvg_build -lgodot-cpp.linux.release.64 -llunasvg.lib
/bin/ld: cannot find -llunasvg.lib: No such file or directory
collect2: error: ld returned 1 exit status
scons: *** [bin/x11/libgodot-svgsprite-release.so] Error 1
scons: building terminated because of errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants