Godot Compile problems

Discuss issues pertaining to the various game/web runtimes of Creature here.
Post Reply
anjey
Posts: 8
Joined: Tue Apr 23, 2019 1:35 pm

Godot Compile problems

Post by anjey » Thu Sep 12, 2019 11:19 am

Hi there,
I am trying to compile creature with current godot master and 3.1.1 release. Unfortunately I get some errors. Compile runs through without creature module. I have used the module: Creature_Godot-master -> creaturegodot3 -> creaturegodot

Do I need to change something for my build setup?

Code: Select all

CreatureMetaData.cpp
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\glm\detail\type_half.inl(1): warning C4828: Die Datei enthält ein Zeichen, das bei Offset 0x72f beginnt. Dieses Zeichen ist im aktuellen Quellzeichensatz (Codepage 65001) unzulässig.
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(46): error C2039: "shared_ptr": Ist kein Element von "std"
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include\string(19): note: Siehe Deklaration von "std"
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(46): error C2065: "shared_ptr": nichtdeklarierter Bezeichner
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(46): error C2275: "CreatureModule::CreatureAnimation": Ungültige Verwendung dieses Typs als Ausdruck
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(46): note: Siehe Deklaration von "CreatureModule::CreatureAnimation"
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(45): error C2974: "std::unordered_map": Ungültiges Vorlage-Argument für "_Ty", Typ erwartet.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include\unordered_map(79): note: Siehe Deklaration von "std::unordered_map"
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include\unordered_map(78): error C3203: "pair" : Klasse Vorlage (nicht spezialisiert) kann nicht als Vorlage-Argument für den Vorlage-Parameter "_Ty" verwendet werden, ein realer Typ wurde erwartet.
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(46): error C2143: Syntaxfehler: Es fehlt ")" vor ">"
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(46): error C2059: Syntaxfehler: ">"
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(46): error C2059: Syntaxfehler: ">"
modules\creaturegodot\CreatureMetaData.cpp(489): error C2511: "void CreatureModule::CreatureMetaData::updateRegionColors(std::unordered_map<std::string,std::shared_ptr<CreatureModule::CreatureAnimation>,std::hash<_Kty>,std::equal_to<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>> &)": Überladene Memberfunktion nicht in "CreatureModule::CreatureMetaData" gefunden
        with
        [
            _Kty=std::string,
            _Ty=std::shared_ptr<CreatureModule::CreatureAnimation>
        ]
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(21): note: Siehe Deklaration von "CreatureModule::CreatureMetaData"
modules\creaturegodot\CreatureMetaData.cpp(496): error C2530: "clip_regions_data": Verweise müssen initialisiert werden
modules\creaturegodot\CreatureMetaData.cpp(521): error C2671: "CreatureModule::CreatureMetaData::updateRegionColors": Statische Memberfunktionen haben keinen this-Zeiger
scons: *** [modules\creaturegodot\CreatureMetaData.windows.tools.64.obj] Error 2
scons: building terminated because of errors.

chong
Posts: 1022
Joined: Thu Feb 19, 2015 2:21 am

Re: Godot Compile problems

Post by chong » Thu Sep 12, 2019 11:49 am

Hello,

Can you post the error messages in English? It is difficult to decipher what is going on in the compilation.

Update: I synced and pulled the latest Godot Engine sources directly from Github and compiled + ran it successfully. Your error message is very strange, it looks like a lot of the standard libraries for C++ are not available ( like shared_ptr, unordered_map etc. ) You might want to check on that first.

Thanks

anjey
Posts: 8
Joined: Tue Apr 23, 2019 1:35 pm

Re: Godot Compile problems

Post by anjey » Thu Sep 12, 2019 12:50 pm

Hi chong,
unfortunately scons gives me only german error messages, since my os is running in german.

I tried google translate which give a quite good english translation. Hopefully this helps you out better. If not, I will try test it on my linux machine at home. I think it is setup in english.

Code: Select all

CreatureMetaData.cpp
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\glm\detail\type_half.inl (1): warning C4828: The file contains a character starting at offset 0x72f. This character is not allowed in the current source character set (code page 65001).
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h (46): error C2039: "shared_ptr": Is not an element of "std"
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include\string (19): note: See declaration of "std"
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h (46): error C2065: "shared_ptr": undeclared identifier
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h (46): error C2275: "CreatureModule :: CreatureAnimation": Invalid use of this type as an expression
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h (46): note: See Declaration of "CreatureModule :: CreatureAnimation"
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h (45): error C2974: "std :: unordered_map": Invalid template argument for "_Ty", type expected.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include\unordered_map (79): note: See declaration of "std :: unordered_map"
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include\unordered_map (78): error C3203: "pair": Class template (not specialized) can not be used as Template argument used for the template parameter "_Ty", a real type was expected.
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h (46): error C2143: Syntax error: ")" is missing before ">"
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h (46): error C2059: Syntax error: ">"
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h (46): error C2059: Syntax error: ">"
modules\creaturegodot\CreatureMetaData.cpp (489): error C2511: "void CreatureModule :: CreatureMetaData :: updateRegionColors (std :: unordered_map <std :: string, std :: shared_ptr <CreatureModule :: CreatureAnimation>, std :: hash < _Kty>, std :: equal_to <_Kty>, std :: allocator <std :: pair <const _Kty, _Ty >>> &) ": Overloaded member function not found in" CreatureModule :: CreatureMetaData "
        with
        [
            _Kty = std :: string,
            _Ty = std :: shared_ptr <CreatureModule :: CreatureAnimation>
        ]
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h (21): note: See Declaration of "CreatureModule :: CreatureMetaData"
modules\creaturegodot\CreatureMetaData.cpp (496): error C2530: "clip_regions_data": References must be initialized
modules\creaturegodot\CreatureMetaData.cpp (521): error C2671: "CreatureModule :: CreatureMetaData :: updateRegionColors": Static member functions do not have this pointer
scons: *** [modules\creaturegodot\CreatureMetaData.windows.tools.64.obj] Error 2
scons: building canceled because of errors.

chong
Posts: 1022
Joined: Thu Feb 19, 2015 2:21 am

Re: Godot Compile problems

Post by chong » Thu Sep 12, 2019 2:20 pm

Hello,

Your compiler is complaining that a lot of the libraries that should be available for a standard C++ build are not there. These should be part of the standard library ( like shared_ptr for instance ) but it is not found on your system. You might want to look into that first.

Thanks

anjey
Posts: 8
Joined: Tue Apr 23, 2019 1:35 pm

Re: Godot Compile problems

Post by anjey » Mon Sep 16, 2019 5:53 am

Hi chong,
thanks for your reply. My question would be, can you tell me what I need to install in order the build process to be working?

In the godot docs they write that I need to install vs community and check the Desktop Developement with C++. I did that and godot compiles fine. Do you know what other components(there are so many of them) need to be installed to fix the missing libraries like shared_ptr? Maybe other people run into same trouble, that way we can update the compiling docs for godot creature module. My computer was pretty blank before, as I do not develop in c++. So asume this could be an issue for other people as well.

Thanks for your time and support so far.

I was able to install an english language pack. That way all logs are in english. So I am posting them again here:

Code: Select all

CreatureMetaData.cpp
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\glm\detail\type_half.inl(1): warning C4828: The file contains a character starting at offset 0x72f that is illegal in the current source character set (codepage 65001).
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(46): error C2039: 'shared_ptr': is not a member of 'std'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include\string(19): note: see declaration of 'std'
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(46): error C2065: 'shared_ptr': undeclared identifier
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(46): error C2275: 'CreatureModule::CreatureAnimation': illegal use of this type as an expression
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(46): note: see declaration of 'CreatureModule::CreatureAnimation'
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(45): error C2974: 'std::unordered_map': invalid template argument for '_Ty', type expected
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include\unordered_map(79): note: see declaration of 'std::unordered_map'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include\unordered_map(78): error C3203: 'pair': unspecialized class template can't be used as a template argument for template parameter '_Ty', expected a real type
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(46): error C2143: syntax error: missing ')' before '>'
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(46): error C2059: syntax error: '>'
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(46): error C2059: syntax error: '>'
modules\creaturegodot\CreatureMetaData.cpp(489): error C2511: 'void CreatureModule::CreatureMetaData::updateRegionColors(std::unordered_map<std::string,std::shared_ptr<CreatureModule::CreatureAnimation>,std::hash<_Kty>,std::equal_to<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>> &)': overloaded member function not found in 'CreatureModule::CreatureMetaData'
        with
        [
            _Kty=std::string,
            _Ty=std::shared_ptr<CreatureModule::CreatureAnimation>
        ]
C:\Users\g041481\Downloads\godot-master\modules\creaturegodot\CreatureMetaData.h(21): note: see declaration of 'CreatureModule::CreatureMetaData'
modules\creaturegodot\CreatureMetaData.cpp(496): error C2530: 'clip_regions_data': references must be initialized
modules\creaturegodot\CreatureMetaData.cpp(521): error C2671: 'CreatureModule::CreatureMetaData::updateRegionColors': static member functions do not have 'this' pointers
scons: *** [modules\creaturegodot\CreatureMetaData.windows.tools.64.obj] Error 2
scons: building terminated because of errors.

chong
Posts: 1022
Joined: Thu Feb 19, 2015 2:21 am

Re: Godot Compile problems

Post by chong » Mon Sep 16, 2019 1:24 pm

Hello,
Can you try adding this line:

#include <memory>

in the includes section ( at the beginning ) of the CreatureMetaData.h file and compile again.
That should have the definitions of shared_ptr .

Post Reply