kyledouglasolsen
I'm following the video tutorial here: http://docs.voxelfarm.com/unity-tutorial

When attempting to build the x64 dll I receive the following linker errors in visual studio:

Quote:

1>------ Build started: Project: VoxelFarmLibrary, Configuration: Release_Physics x64 ------
1> worley.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\worley.cpp': No such file or directory
1> WinMutex.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\WinMutex.cpp': No such file or directory
1> WhiteNoise.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\WhiteNoise.cpp': No such file or directory
1> VoxelSmooth.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\VoxelSmooth.cpp': No such file or directory
1> VoxelLayer.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\VoxelLayer.cpp': No such file or directory
1> VoxelFarm.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\VoxelFarm.cpp': No such file or directory
1> voxcomp.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\voxcomp.cpp': No such file or directory
1> Vector.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\Vector.cpp': No such file or directory
1> TileSet.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\TileSet.cpp': No such file or directory
1> tga.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\tga.cpp': No such file or directory
1> StampMesh.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\StampMesh.cpp': No such file or directory
1> shaders.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\shaders.cpp': No such file or directory
1> scene.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\scene.cpp': No such file or directory
1> Quaternion.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\Quaternion.cpp': No such file or directory
1> qef.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\qef.cpp': No such file or directory
1> PinkNoise.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\PinkNoise.cpp': No such file or directory
1> PhysicsMaterials.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\PhysicsMaterials.cpp': No such file or directory
1> PhysicsMain.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\PhysicsMain.cpp': No such file or directory
1> perlin.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\perlin.cpp': No such file or directory
1> MatrixSSE.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\MatrixSSE.cpp': No such file or directory
1> Generating Code...
1> Compiling...
1> MatrixAlg.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\MatrixAlg.cpp': No such file or directory
1> MaterialLibrary.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\MaterialLibrary.cpp': No such file or directory
1> mapindex.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\mapindex.cpp': No such file or directory
1> LogFile.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\LogFile.cpp': No such file or directory
1> InstanceManager.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\InstanceManager.cpp': No such file or directory
1> HydroTile.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\HydroTile.cpp': No such file or directory
1> Grammar.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\Grammar.cpp': No such file or directory
1> glview.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\glview.cpp': No such file or directory
1> glrender.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\glrender.cpp': No such file or directory
1> Generator.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\Generator.cpp': No such file or directory
1> fileutils.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\fileutils.cpp': No such file or directory
1> ffd.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\ffd.cpp': No such file or directory
1> FastQuadrics.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\FastQuadrics.cpp': No such file or directory
1> ExtensionLayer.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\ExtensionLayer.cpp': No such file or directory
1> contour.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\contour.cpp': No such file or directory
1> ClipmapVisibility.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\ClipmapVisibility.cpp': No such file or directory
1> ClipmapView.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\ClipmapView.cpp': No such file or directory
1> ClipboardData.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\ClipboardData.cpp': No such file or directory
1> Clipboard.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\Clipboard.cpp': No such file or directory
1> CellSeams.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\CellSeams.cpp': No such file or directory
1> Generating Code...
1> Compiling...
1> CellData.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\CellData.cpp': No such file or directory
1> BundleProject.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\BundleProject.cpp': No such file or directory
1> BoxMeshStamp.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\BoxMeshStamp.cpp': No such file or directory
1> BlockData.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\BlockData.cpp': No such file or directory
1> BitStream.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\BitStream.cpp': No such file or directory
1> Biome.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\Biome.cpp': No such file or directory
1> ArchitectureManager.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\Engine.CPP\ArchitectureManager.cpp': No such file or directory
1> Generating Code...
2>------ Build started: Project: VoxelFarmIOLibrary, Configuration: Release_Physics x64 ------
2> ClientChannel.cpp
2>c1xx : fatal error C1083: Cannot open source file: 'ClientChannel.cpp': No such file or directory
2> ExtensionDLL.cpp
2>c1xx : fatal error C1083: Cannot open source file: 'ExtensionDLL.cpp': No such file or directory
2> IOBuffer.cpp
2>c1xx : fatal error C1083: Cannot open source file: 'IOBuffer.cpp': No such file or directory
2> ReadWriteLock.cpp
2>c1xx : fatal error C1083: Cannot open source file: 'ReadWriteLock.cpp': No such file or directory
2> ServerChannel.cpp
2>c1xx : fatal error C1083: Cannot open source file: 'ServerChannel.cpp': No such file or directory
2> VoxelDB.cpp
2>c1xx : fatal error C1083: Cannot open source file: 'VoxelDB.cpp': No such file or directory
2> Generating Code...
3>------ Build started: Project: VoxelFarmDemoUnity, Configuration: Release_Physics x64 ------
3> dllmain.cpp
3> stdafx.cpp
3> VoxelFarmInit.cpp
3> VoxelFarmInitBundle.cpp
3> VoxelFarmInitPerlin.cpp
3> VoxelFarmInitVSProject.cpp
3> voxelfarm_unity.cpp
3> Creating library C:\Users\Kyle\Documents\Voxel Farm SDK\sdk_2.0.3.106\Solutions.VS\x64\Release_Physics\VoxelFarmDemoUnity.lib and object C:\Users\Kyle\Documents\Voxel Farm SDK\sdk_2.0.3.106\Solutions.VS\x64\Release_Physics\VoxelFarmDemoUnity.exp
3>VoxelFarmIOLibrary.lib(IOBuffer.obj) : error LNK2001: unresolved external symbol __imp_htons
3>VoxelFarmIOLibrary.lib(IOBuffer.obj) : error LNK2001: unresolved external symbol __imp_ntohs
3>C:\Users\Kyle\Documents\Voxel Farm SDK\sdk_2.0.3.106\Solutions.VS\x64\Release_Physics\VoxelFarmDemoUnity.dll : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========



I've attempted cleaning and re-scanning the solution with no luck. I'd appreciate any help!

Thanks.
0 0
voxelfarmtorres
It seems you may be trying to build the solution that links to full source code.

Please make sure you have loaded the solution with SDK on its name: VoxelFarmSDK - vs2015.sln

You may have to start from a fresh copy of the Voxel Farm SDK as attempting to build from full source code may have deleted some of the libraries included by default in the package.

The linker errors about htons and ntohs not found are because Visual Studio is not finding the WinSocks library (ws2_32.lib) in your system. This is typically installed as part of the Windows SDK. 

0 0
kyledouglasolsen
Thanks for the quick reply!

I've removed and reinstalled the sdk from a clean slate to ensure no libraries would be missing on your advice. I am now attempting to load the VoxelFarmSDK - vs2015.sln yet I'm still receiving a failed build with this output:

Quote:


1>------ Build started: Project: VoxelFarmDemoUnity, Configuration: Release_Physics x64 ------
1> dllmain.cpp
1> stdafx.cpp
1> VoxelFarmInit.cpp
1> VoxelFarmInitBundle.cpp
1> VoxelFarmInitPerlin.cpp
1> VoxelFarmInitVSProject.cpp
1> voxelfarm_unity.cpp
1> Creating library C:\Users\Kyle\Documents\Voxel Farm SDK\sdk_2.0.3.106\Solutions.VS\x64\Release_Physics\VoxelFarmDemoUnity.lib and object C:\Users\Kyle\Documents\Voxel Farm SDK\sdk_2.0.3.106\Solutions.VS\x64\Release_Physics\VoxelFarmDemoUnity.exp
1>VoxelFarmIOLibrary.lib(IOBuffer.obj) : error LNK2001: unresolved external symbol __imp_htons
1>VoxelFarmIOLibrary.lib(IOBuffer.obj) : error LNK2001: unresolved external symbol __imp_ntohs
1>C:\Users\Kyle\Documents\Voxel Farm SDK\sdk_2.0.3.106\Solutions.VS\x64\Release_Physics\VoxelFarmDemoUnity.dll : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



0 0
voxelfarmtorres
Yes, I mentioned these two errors in my earlier message.

The linker errors about htons and ntohs not found are because Visual Studio is not finding the WinSocks library (ws2_32.lib) in your system. This is typically installed as part of the Windows SDK. 

Can you search for "ws2_32.lib" in your system? This should have been installed along with Visual Studio or the Windows SDK.
0 0
kyledouglasolsen
I don't seem to have ws2_32.lib on my system anywhere. I do have the Windows 10 SDK and Visual Studio Community both installed currently. Could you recommend any specific package I could be missing?
0 0
kyledouglasolsen
I don't seem to have them anywhere on my machine. I do indeed have a Windows SDK installed for Windows 10, I also tried installing the SDK for Windows 7 on the advice of a random forum post I found related to WinSocks lib, but was still unable to find it. However the dll included with the your Unity demo seems to already be compiled for x64 so this looks to be unnecessary after all!

Thanks.
0 0
kyledouglasolsen
It looks like I will indeed need to be adding some additional functionality from Voxel Farm SDK to our dll after all. I am currently able to build the Release version without the ws2_32.lib file. What functionality would be missing from Voxel Farm building sans Physics?

Also could you recommend a link or version of the Windows SDK that should contain this lib?
0 0
voxelfarmtorres
For Unity the "Release" target will work just fine. The "Release_Physics" target has effect only for the OpenGL demos, which use the Bullet physics library when this target is set. For Unity, it does not matter since Unity includes a physics solver of its own, PhysX, and this is always enabled.
0 0
kyledouglasolsen
Excellent! Thank you so much for the quick replies, you guys rock.
0 0
voxelfarmtorres
Looking once again at this issue we realized the WinSock library is not included in the linker properties in the Unity plugin for "Release_Physics" target.

In Project Properties for the VoxelFarmDemoUnity project, navigate to the Linker\Input page:

linker.png 

And make sure "ws2_32.lib" is listed in Additional Dependencies.
0 0