It is currently Sat Aug 22, 2020 4:28 am


All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Got compile errors in file "Raycast.inl"!
PostPosted: Fri Aug 09, 2013 9:56 am 

Joined: Fri Sep 10, 2010 5:38 am
Posts: 30
Currently I am trying to port my project to Polyvox 0.2.1. And doing my voxel picking thing. As posted here http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=492.

But when I compile my source code, I get following errors in file "Raycast.inl"!

Code:
1>------ Build started: Project: Basic, Configuration: Debug Win32 ------
1>Build started 8/9/2013 5:46:27 PM.
1>InitializeBuildStatus:
1>  Touching "Debug\Basic.unsuccessfulbuild".
1>CustomBuild:
1>  Moc'ing OpenGLWidget.h...
1>ClCompile:
1>  moc_OpenGLWidget.cpp
1>  OpenGLWidget.cpp
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(74): error C2825: 'VolumeType': must be a class or namespace when followed by '::'
1>          D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(176) : see reference to function template instantiation 'PolyVox::RaycastResult PolyVox::raycastWithEndpoints<VolumeType,Callback>(VolumeType *,const PolyVox::Vector3DFloat &,const PolyVox::Vector3DFloat &,Callback &)' being compiled
1>          with
1>          [
1>              VolumeType=PolyVox::SimpleVolume<uint8_t> *,
1>              Callback=RaycastIntersectionFinder
1>          ]
1>          OpenGLWidget.cpp(439) : see reference to function template instantiation 'PolyVox::RaycastResult PolyVox::raycastWithDirection<PolyVox::SimpleVolume<VoxelType>*,RaycastIntersectionFinder>(VolumeType *,const PolyVox::Vector3DFloat &,const PolyVox::Vector3DFloat &,Callback &)' being compiled
1>          with
1>          [
1>              VoxelType=uint8_t,
1>              VolumeType=PolyVox::SimpleVolume<uint8_t> *,
1>              Callback=RaycastIntersectionFinder
1>          ]
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(74): error C2039: 'Sampler' : is not a member of '`global namespace''
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(74): error C2146: syntax error : missing ';' before identifier 'sampler'
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(74): error C3861: 'sampler': identifier not found
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(109): error C2065: 'sampler' : undeclared identifier
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(109): error C2228: left of '.setPosition' must have class/struct/union
1>          type is ''unknown-type''
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(113): error C2065: 'sampler' : undeclared identifier
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(124): error C2065: 'sampler' : undeclared identifier
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(124): error C2228: left of '.movePositiveX' must have class/struct/union
1>          type is ''unknown-type''
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(125): error C2065: 'sampler' : undeclared identifier
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(125): error C2228: left of '.moveNegativeX' must have class/struct/union
1>          type is ''unknown-type''
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(132): error C2065: 'sampler' : undeclared identifier
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(132): error C2228: left of '.movePositiveY' must have class/struct/union
1>          type is ''unknown-type''
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(133): error C2065: 'sampler' : undeclared identifier
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(133): error C2228: left of '.moveNegativeY' must have class/struct/union
1>          type is ''unknown-type''
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(140): error C2065: 'sampler' : undeclared identifier
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(140): error C2228: left of '.movePositiveZ' must have class/struct/union
1>          type is ''unknown-type''
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(141): error C2065: 'sampler' : undeclared identifier
1>D:\polyvox-0.2.1\library\PolyVoxCore\include\PolyVoxCore/Raycast.inl(141): error C2228: left of '.moveNegativeZ' must have class/struct/union
1>          type is ''unknown-type''
1>  main.cpp
1>  window.cpp
1>  Generating Code...
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:12.23
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



I really donnot know what's wrong!


Attachments:
OpenGLWidget.h [3.74 KiB]
Downloaded 247 times
RaycastIntersectionFinder.cpp [290 Bytes]
Downloaded 256 times
RaycastIntersectionFinder.h [851 Bytes]
Downloaded 246 times
Top
Offline Profile  
Reply with quote  
 Post subject: Re: Got compile errors in file "Raycast.inl"!
PostPosted: Fri Aug 09, 2013 10:02 am 

Joined: Fri Sep 10, 2010 5:38 am
Posts: 30
this 4 files are voxel picking related. are there any bugs there? Currently I am not sure whether the Callback is on its right way!


Attachments:
OpenGLWidget.cpp [21.52 KiB]
Downloaded 259 times
Top
Offline Profile  
Reply with quote  
 Post subject: Re: Got compile errors in file "Raycast.inl"!
PostPosted: Fri Aug 09, 2013 10:22 am 

Joined: Fri Sep 10, 2010 5:38 am
Posts: 30
I have just check that there are new files added to the .2.1 source named "Picking.inl" within "develop" Branch. May be it can Solve my problem!
https://bitbucket.org/volumesoffun/polyvox/src/7c74e1faff18592dcfe66ae629858fb1c9b69520/library/PolyVoxCore/include/PolyVoxCore/Picking.inl?at=develop


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Got compile errors in file "Raycast.inl"!
PostPosted: Sat Aug 10, 2013 7:20 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Which version of Visual Studio are you using? The released version of PolyVox 0.2.1 should work with 2008 and 2010, but the code in develop branch is currently only tested with 2010.

Do the examples work for you? Perhaps you are not sure because of the Qt5 problems?

You should indeed look at Picking.h/inl. These provide a simpler interface where you do not have to specify a callback function. Instead you just have to provide an example of an empty voxel.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Got compile errors in file "Raycast.inl"!
PostPosted: Sun Aug 11, 2013 2:02 am 
User avatar

Joined: Tue Feb 05, 2013 5:44 pm
Posts: 33
I have compiled polyvox on Visual Studio 2012 as well


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Got compile errors in file "Raycast.inl"!
PostPosted: Sun Aug 11, 2013 2:11 am 

Joined: Fri Sep 10, 2010 5:38 am
Posts: 30
David Williams wrote:
Which version of Visual Studio are you using? The released version of PolyVox 0.2.1 should work with 2008 and 2010, but the code in develop branch is currently only tested with 2010.

Do the examples work for you? Perhaps you are not sure because of the Qt5 problems?

You should indeed look at Picking.h/inl. These provide a simpler interface where you do not have to specify a callback function. Instead you just have to provide an example of an empty voxel.


Thank you David,the picking.h/inl works now. I am using VC++2010. The problem above is really wired.

Anyway it works.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Got compile errors in file "Raycast.inl"!
PostPosted: Mon Aug 12, 2013 8:04 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Dynasty wrote:
I have compiled polyvox on Visual Studio 2012 as well


Interesting... did you get the examples to compile? When I tested it I couldn't build the A* pathfinder example due to the use of std::function. Apparently there is a known bug in VS2012 here, so I was actually planning to replace the std::function with more standard callbacks.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net