Volumes Of Fun http://www.volumesoffun.com/phpBB3/ |
|
[Resolved]: Integration fails compiling with VS2008 http://www.volumesoffun.com/phpBB3/viewtopic.php?f=15&t=258 |
Page 2 of 2 |
Author: | David Williams [ Sun Sep 04, 2011 1:02 pm ] |
Post subject: | Re: Integration fails compiling with Visual Studio 2008 |
Ok, I've tidied up the headers which was useful but ultimatly didn't fix the problem. So now I've removed this hack: Code: typedef Volume<VoxelType> VolumeOfVoxelType; //Workaround for GCC/VS2010 differences. //class Sampler : public VolumeOfVoxelType::template Sampler< RawVolume<VoxelType> > Which allowed it to compile on both Visual Studio and GCC and replaced it with the preprocessor: Code: #if defined(_MSC_VER) class Sampler : public Volume<VoxelType>::Sampler< RawVolume<VoxelType> > //This line works on VS2010 #else class Sampler : public Volume<VoxelType>::Sampler Nested< RawVolume<VoxelType> > //This line works on GCC #endif As far as I can tell it seems to work ok now. Feel free to give it a go - but be warned that I did also notice the VolumeResampler example is broken in Git master (it generates some crazy geometry). |
Author: | DragonM [ Wed Sep 07, 2011 5:29 am ] |
Post subject: | Re: Integration fails compiling with Visual Studio 2008 |
David Williams wrote: Ok, I've tidied up the headers which was useful but ultimatly didn't fix the problem. So now I've removed this hack: Much appreciated. I'll switch back to using the latest version tomorrow. It's a relief to know I won't have to fork.
Code: typedef Volume<VoxelType> VolumeOfVoxelType; //Workaround for GCC/VS2010 differences. //class Sampler : public VolumeOfVoxelType::template Sampler< RawVolume<VoxelType> > Which allowed it to compile on both Visual Studio and GCC and replaced it with the preprocessor: Code: #if defined(_MSC_VER) class Sampler : public Volume<VoxelType>::Sampler< RawVolume<VoxelType> > //This line works on VS2010 #else class Sampler : public Volume<VoxelType>::Sampler Nested< RawVolume<VoxelType> > //This line works on GCC #endif As far as I can tell it seems to work ok now. Feel free to give it a go - but be warned that I did also notice the VolumeResampler example is broken in Git master (it generates some crazy geometry). |
Page 2 of 2 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |