Skip to content

Binding generator isn't generating implementations for templated functions #1093

Closed

Description

@ghsoares

References godotengine/godot#76213

I'm having a issue with Callable::bind, which is throwing LNK2019 when trying to call with any arbitrary arguments, let's take uint64_t as only argument for example, when compiling the extension, it throws the following error: error LNK2019: unresolved external symbol, "public: class godot::Callable __cdecl godot::Callable::bind<unsigned __int64>(unsigned __int64 const &)const ".

When inspecting godot-cpp\gen\src\variant\callable.cpp, it's missing the implementation for Callable::bind, so I guess that's why it throws the linker error. It is missing other templated member functions as well, for example Callable::call and Signal::emit.

Edit: It seens that the majority of the templated functions is already implemented in the .hpp files, only some specific cases where it isn't implemented in the .hpp neither in the .cpp

Activity

  1. fuzzybinary commented on Jun 3, 2023

    @fuzzybinary

    I've also run into this. It appears GDExtension doesn't currenlty have a way to call vararg methods on variants?

  2. dsnopek commented on Jun 9, 2023

    @dsnopek
    Collaborator

    There's a work-in-progress PR to fix this: #1091

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions