Question

I'm trying to include PolyVox, a voxel library, into my project. However the library download does not supply you with precompiled headers and instead requires Cmake. This wouldn't be a huge problem, except that their tutorial on the subject is extremely incomplete. I've never used Cmake before, and searching shed no light on the problem.

I've ran Cmake with the Visual Studio 10 compiler, which generated a bunch of Visual Studio projects. I compiled those projects into 2 libraries, and included the library directories in the project's properties. I also put all of PolyVox's header files in directories Visual Studio is aware of. When attempting to compile my project I get linker errors such as:

1>Gamestate.obj : error LNK2019: unresolved external symbol "public: __thiscall PolyVox::Region::Region(class PolyVox::Vector<3,int> const &,class PolyVox::Vector<3,int> const &)" (??0Region@PolyVox@@QAE@ABV?$Vector@$02H@1@0@Z) referenced in function "public: __thiscall Gamestate::Gamestate(void)" (??0Gamestate@@QAE@XZ)

Could someone please explain to me how to properly include PolyVox into my code using Cmake?

Was it helpful?

Solution

You forgot to add polyvox library in your game project. It's in the Linker menu and called "Additional dependencies", IIRC.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top