aaronstackpole

Wanted to raise a warning for anyone else who might be trying to build the library themselves and then use that for the plugin. It looks like they've refactored the VoxelFarmIOLibrary class "VoxelDB" into "VoxelFileDB" but only in the plugin, so if you build from the IO.LIB source you won't be able to use the library you generate because of the include mismatch, the plugin looks for VoxelFileDB, so you'll need to align those name. Don't know if there were other classes renamed only in the plugin.

VoxelFarm, please make sure both the plugin and library build the same!

 

0 0
voxelfarmtorres
We'll double check, please note that VoxelFileDB is not a replacement for VoxelDB. The class was not renamed, one DB was replaced by another DB. Both classes exist and are used in different scenarios. The UE4 plugin is the only one using VoxelFileDB at the moment.

Can you be specific about the errors you are getting? We see no issues compiling and linking the libraries at the moment.
0 0
aaronstackpole
You did not provide the class files for me to be able to build the deviant version of the project that's in the plugin. You need to include the altered version, not just the headers, or else I can't make changes to the plugin and build new versions of it. The error is that the plugin code in AVoxelFarmWorldActor refer to VoxelFarmIOLibrary::VoxelFileDB and these files do not exist in the IO.LIB, so when I build the library from the SDK files, the new library does not match the library for the plugin, the plugin throws an error that it can't find the function that doesn't exist.
0 0
aaronstackpole
voxelfiledb.png 
0 0
aaronstackpole
What you see here is my solution on the left which builds the libraries out of the Engine.CPP and IO.LIB folders in the SDK, I then copy the generated libraries from the staging solution into the plugin and rebuild the unreal project from there. Since you made a change only to the library in the plugin and included only the headers, I am restricted to using only your library that you built, this is unacceptable. Please provide the full code for the plugin.

solution.png 
0 0
voxelfarmtorres
Please note VoxelFileDB is not part of VoxelFarmIOLib. This class is placed in Engine.CPP and compiles into VoxelFarmLibary.lib. You can see this in the original solution.

The original SDK distribution includes this correctly. In you case, you appear to have moved files to different places (Headers\VoxelFarmIOLibrary for instance). This may produce errors if not done correctly, at the same time these errors are unlikely to affect other users.
0 0
aaronstackpole
I see, I found it in the VoxelFarmLibrary, it's included there, so as you pointed out what must be happening here is confusion on the namespace. Thank you.
0 0
aaronstackpole
After restructuring to include all of the headers in the same folder, the issue went away. Sorry for assuming you'd respect namespace boundaries [wink] <3
0 0
voxelfarmtorres
Namespaces breakdown the symbol space into finer domains while libraries contain implementation code. These are orthogonal.

There is no 1:1 correlation between namespaces and the libraries that will eventually contain implementation code. By looking at a namespace you should not make any inference of which library will contain code for that class. This is established by which library contains the class implementation.

For instance, implementation for classes in the namespaces Algebra and Architecture are located in the same library. There are no Algebra and Architecture libraries. The same rationale applies to the case of IO::VoxelFileDB. It goes into the same library where the other portable classes are implemented.
0 0
aaronstackpole
Yes, I understand your entire namespace is irrelevant, the whole library is just flat. Sorry, it's just been a huge adjustment coming from a decade of OOP, I have so many assumptions about the encapsulation and format of the projects. What I find odd is that the code is built in the right place, however, the compiler couldn't find it because I had simply separated the files into different folders. This implies to me that VoxelFarmIOLibrary is actually an extension, which I'm pretty sure is basically what the comments in the header says [wink] Still seems odd that it couldn't link the symbol up to the appropriate library, the headers were already there, but the linker tried to look in the wrong library file for whatever reason, I guessed this was because the linker assumed the 1:1 relation between the libraries and namespaces for some reason.
0 0
voxelfarmtorres
Yes, it seems odd. Namespaces are used to mangle symbols, after that, it does not matter who implements the symbol.

The error in the screenshot you posted above is not a linker error. Can you provide the linker error?
0 0
aaronstackpole
Was no linker error, the UBT stopped at that point because it couldn't find the function. I wouldn't be able to generate the error again now since I've fixed it and moved on.
0 0