Comments (22)
I compiled it recently for 2.1 master and it worked. I have no idea of what's going on in 2.2 Oo
from godot_voxel.
I have no idea of what's going on in 2.2
@Zylann neither do I, of the 3 voxel terrain modules I've tried all have failed to compile in 2.2 with more or less the same error. I'll down grade to 2.1 later on tomorrow and see if that works
from godot_voxel.
What do you call 2.2? I don't see this branch on Godot Github.
from godot_voxel.
@Zylann Sorry about that, it seems to be 2.1 but for some reason the version godot reports is 2.2. The branch I cloned and compiled from (Which doesn't work with godot_voxel) is 2.1
from godot_voxel.
@Zylann Just tried to compile with 2.0 and it fails with the same error
from godot_voxel.
I'll try to compile it when I get back home
from godot_voxel.
Aaaahhh I should have seen that from the beginning:
The error you get happens in modules/register_module_types.cpp:61:31.
This file is not part of my module, it's supposed to have been generated by SCons.
The voxel module is inside my register_module_types.cpp file, however for some reason, I also noticed another module I'm making doesn't appears as well in this file, and I have no idea why...
maybe something changed that made the module remain undetected?
I see the python code called by SCons finds modules if they match the following path pattern: "modules/"+x+"/register_types.h"
.
I din't see where is the problem :/
from godot_voxel.
Got it: you have to name the module's folder "voxel", not "godot_voxel".
The reason why is that Godot SCons scripts are detecting the directory name as the module name. But of course the repo name doesn't matches, because I choosed it as... well, a Github repo name.
That's annoying, but it should fix your problem :)
from godot_voxel.
@Zylann That has fixed the first issue but I've seem to have run into a new one. Now when I try to compile I get the following error
modules/voxel/voxel_terrain.cpp: In member function 'void VoxelTerrain::update_blocks()': modules/voxel/voxel_terrain.cpp:97:32: warning: unused variable 'err' [-Wunused-variable] Variant::CallError err; // wut ^ In file included from core/resource.h:35:0, from core/script_language.h:32, from ./scene/main/node.h:36, from modules/voxel/voxel_terrain.h:4, from modules/voxel/voxel_terrain.cpp:1: core/reference.h: In instantiation of 'void Ref<T>::unref() [with T = VoxelLibrary]': core/reference.h:308:8: required from 'Ref<T>::~Ref() [with T = VoxelLibrary]' modules/voxel/voxel_mesher.h:12:7: required from 'void memdelete(T*) [with T = VoxelMesher]' core/reference.h:292:13: required from 'void Ref<T>::unref() [with T = VoxelMesher]' core/reference.h:308:8: required from 'Ref<T>::~Ref() [with T = VoxelMesher]' modules/voxel/voxel_terrain.h:30:44: required from here core/reference.h:290:17: error: invalid use of incomplete type 'class VoxelLibrary' if (reference && reference->unreference()) { ^ In file included from modules/voxel/voxel_mesher.h:7:0, from modules/voxel/voxel_terrain.h:6, from modules/voxel/voxel_terrain.cpp:1: modules/voxel/voxel.h:6:7: note: forward declaration of 'class VoxelLibrary' class VoxelLibrary;
from godot_voxel.
I deleted all .obj files and compiled again the module, I don't get this error :/
Maybe I have forgot to push some changes, I'll check that
from godot_voxel.
@Zylann They aren't any objs in /modules
from godot_voxel.
Yeah sorry I was talking about the binary files generated by the compiler, they are .o or .a with other ones.
Edit: same with a git reset to the latest repo's commit. No error...
from godot_voxel.
@Zylann I deleted all .a and .o files from my godot dir and ran into the same issue when compiling
from godot_voxel.
Yeah I just meant "I cleaned and build".
Anyways, I also tried to completely remove the module from my project, re-clone it from Github, compile it out of the box with the engine... and no error. There is something strange going on Oo
I'm using the Visual Studio compiler, btw.
I'm going to try cleaning everything including the engine itself, but I don't feel that will change much.
from godot_voxel.
I'm going to reclone this and godot and see if it will build then
from godot_voxel.
@Zylann It still fails to build. What platform are you building on and with what compiler?
from godot_voxel.
I'm building on Windows with Visual Studio 2015. Well I just use the scons p=windows target=debug
command.
It looks like your compiler is confused by this:
// voxel_terrain.h
Ref<VoxelMesher> get_mesher() { return _mesher; }
Because Ref is header-only, it tries to compile the case where the refcount becomes zero and deletes VoxelMesher. But VoxelMesher contains a Ref<VoxelLibrary>
, which is forward-declared to avoid cyclic inclusion. So the destructor of VoxelLibrary is unknown at the time (but it definitely exists):
error: invalid use of incomplete type 'class VoxelLibrary'
if (reference && reference->unreference()) { ^
I wonder if that's a compiler bug or if that's a real code issue :s
What happens if you prepend _FORCE_INLINE_
to get_mesher()? Not sure if it helps but could be worth trying. If it doesn't do anything, try to move the implementation to the .cpp file.
from godot_voxel.
I tried building for windows using and got the same error and I tried building using clang and got a new error
core/reference.h:290:29: error: member access into incomplete type 'VoxelLibrary' if (reference && reference->unreference()) { ^ core/reference.h:308:3: note: in instantiation of member function 'Ref<VoxelLibrary>::unref' requested here unref(); ^ modules/voxel/voxel_mesher.h:12:7: note: in instantiation of member function 'Ref<VoxelLibrary>::~Ref' requested here class VoxelMesher : public Reference { ^ core/reference.h:292:4: note: in instantiation of function template specialization 'memdelete<VoxelMesher>' requested here memdelete(reference); ^ core/reference.h:87:3: note: in instantiation of member function 'Ref<VoxelMesher>::unref' requested here unref(); ^ core/reference.h:223:3: note: in instantiation of member function 'Ref<VoxelMesher>::ref' requested here ref(p_from); ^ modules/voxel/voxel_terrain.h:30:44: note: in instantiation of member function 'Ref<VoxelMesher>::Ref' requested here Ref<VoxelMesher> get_mesher() { return _mesher; } ^ modules/voxel/voxel.h:6:7: note: forward declaration of 'VoxelLibrary' class VoxelLibrary;
from godot_voxel.
Yeah that's the same thing... did you tried to use inline or .cpp implementation?
Another try, put #include "voxel_library.h"
as the last include in voxel_mesher.h? This one should do the trick, I verified and in fact I don't think it would cause cyclic inclusion.
from godot_voxel.
What happens if you prepend FORCE_INLINE to get_mesher()?
Mind explaining what that is/how to do it? (I'm really not a C++ person)
from godot_voxel.
Replace this line:
Ref<VoxelMesher> get_mesher() { return _mesher; }
By this:
_FORCE_INLINE_ Ref<VoxelMesher> get_mesher() { return _mesher; }
But I'm not sure on this one.
Try this first;
In voxel_mesher.h, add this after all the #include
s:
#include "voxel_library.h"
from godot_voxel.
@Zylann That seems to have fixed it (Adding #include "voxel_library.h"), Godot compiles and runs. Thanks for the help!
from godot_voxel.
Related Issues (20)
- GDExtension API dump wrong type for enum VoxelInstancer::UpMode HOT 3
- So... quick question how would I make the noise larger? HOT 1
- VoxelMeshSDF partition_subdiv description missing info about BAKE_MODE_APPROX_FLOODFILL HOT 1
- VoxelMeshSDF get_aabb() mentions non existant margin property HOT 1
- Dummy page "2" not needed anymore HOT 1
- Assertion printed when previewing last VoxelMeshSDF layer in editor HOT 1
- VoxelModifier preview mesh has gaps with smoothness HOT 3
- Toggling visibility of VoxelModifier does nothing HOT 1
- VoxelModifierMesh changing isolevel does not update preview HOT 1
- Is the VoxelGraphGenerator usable as a base for the generation in a VoxelGenerationScript? HOT 10
- VoxelMeshSDF incorrect BAKE_MODE_ACCURATE_NAIVE description about sign calculation HOT 2
- VoxelMeshSDF BAKE_MODE_ACCURATE_PARTITIONED does not accurately bake PrismMesh HOT 3
- VoxelModifierMesh does not show up under VoxelTerrain HOT 2
- Performing edit on VoxelTerrain that hasn't loaded yet silently fails HOT 6
- Voxel Cubes not texturing. and meshes laggy and unpreforment. HOT 4
- Godot crashes when trying to add any element to the VoxelBlockyTypeLibrary HOT 2
- Error reported using '_GenerateBlock' of 'C #' HOT 3
- VoxelTool.do_* functions do not ignore VoxelModifier on terrain HOT 4
- VoxelModifier get cutout around edited regions HOT 2
- Double custom_build [15073afe3] crash when installing SQLite GDExtension HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot_voxel.