Zylann/godot_heightmap_module

Error in compiling

Closed this issue · 9 comments

Hi,
I've tried to compile godot alpha 3 (downloaded version on 13 August), but I get this error on your module:

modules/hterrain/height_map_brush.cpp:168:8: error: implicit default constructor for 'OperatorAdd' must explicitly initialize the reference member '_im' struct OperatorAdd { ^ modules/hterrain/height_map_brush.cpp:169:9: note: declared here Image &_im; ^ modules/hterrain/height_map_brush.cpp:362:14: note: implicit default constructor for 'OperatorAdd' first required here OperatorAdd op { **im_ref }; ^ modules/hterrain/height_map_brush.cpp:362:16: error: expected ';' at end of declaration OperatorAdd op { **im_ref }; ^ ; 2 errors generated.

Any suggestions?
Thanks in advance.
-j

Ah, yeah I used initialization lists to instance some structs, I need to replace that with constructors, MSVC compiles this fine but not other compilers.

Just submitted a fix, let me know if it works for you

Hi,
thanks for reply.
Now I get this error:

modules/hterrain/height_map_editor_plugin.cpp:265:38: error: conversion from 'size_t' (aka 'unsigned long') to 'const Variant' is ambiguous .format(varray(size.x, size.y, len)));

I use scons on MacOS Sierra.

Seriously -_- It's like compiling in C# there... the fix would be to basically write static_cast<int>(len). Does it work if you do that?
What kind of compiler is it?

SCONS on Mac

SCons isn't a compiler. Is it GCC? Clang?
Can you try doing the cast and tell me if there are other errors? I can't check this on my computer^^"

Ah, sorry...
I think is Clang

Is it compiling if you do the cast?

Yes, it works!
Thank you so much.
-j