Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Not_a_Robot | |
Old Version | Published before Godot 3 was released. |
Hello!
When trying to compile a module I get:
In file included from core/object_type_db.h:33:0,
from core/object.h:714,
from core/reference.h:32,
from modules/mymodule/mymodule.h:4,
from modules/mymodule/MYMODULE.cpp:1:
core/method_bind.h: In instantiation of 'static T VariantCaster<T>::cast(const Variant&) [with T = char*]':
core/method_bind.inc:673:23: required from 'Variant MethodBind1<P1>::call(Object*, const Variant**, int, Variant::CallError&) [with P1 = char*]'
modules/mymodule/MYMODULE.cpp:48:1: required from here
core/method_bind.h:63:10: error: conversion from 'const Variant' to 'char*' is ambiguous
return p_variant;
^
In file included from core/object.h:33:0,
from core/reference.h:32,
from modules/mymodule/mymodule.h:4,
from modules/mymodule/MYMODULE.cpp:1:
core/variant.h:202:2: note: candidate: Variant::operator CharType() const <near match>
operator CharType() const;
^
core/variant.h:202:2: note: no known conversion from 'CharType {aka wchar_t}' to 'char*'
core/variant.h:195:2: note: candidate: Variant::operator uint64_t() const <near match>
operator uint64_t() const;
^
core/variant.h:195:2: note: no known conversion from 'uint64_t {aka long unsigned int}' to 'char*'
core/variant.h:194:2: note: candidate: Variant::operator int64_t() const <near match>
operator int64_t() const;
^
core/variant.h:194:2: note: no known conversion from 'int64_t {aka long int}' to 'char*'
core/variant.h:192:2: note: candidate: Variant::operator unsigned char() const <near match>
operator unsigned char() const;
^
core/variant.h:192:2: note: no known conversion from 'unsigned char' to 'char*'
core/variant.h:191:2: note: candidate: Variant::operator signed char() const <near match>
operator signed char() const;
^
core/variant.h:191:2: note: no known conversion from 'signed char' to 'char*'
core/variant.h:190:2: note: candidate: Variant::operator short unsigned int() const <near match>
operator unsigned short() const;
^
core/variant.h:190:2: note: no known conversion from 'short unsigned int' to 'char*'
core/variant.h:189:2: note: candidate: Variant::operator short int() const <near match>
operator signed short() const;
^
core/variant.h:189:2: note: no known conversion from 'short int' to 'char*'
core/variant.h:188:2: note: candidate: Variant::operator unsigned int() const <near match>
operator unsigned int() const; // this is the real one
^
core/variant.h:188:2: note: no known conversion from 'unsigned int' to 'char*'
core/variant.h:187:2: note: candidate: Variant::operator int() const <near match>
operator signed int() const;
^
core/variant.h:187:2: note: no known conversion from 'int' to 'char*'
scons: *** [modules/mymodule/MYMODULE.x11.tools.64.o] Error 1
scons: building terminated because of errors.
How can I start solving this?
Any help is appreciated.
Thank you in advance!