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


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: [Resolved]Compiler errors in opengl example project
PostPosted: Wed Jan 11, 2012 7:55 pm 

Joined: Wed Jan 11, 2012 7:33 pm
Posts: 109
Hello, I was trying to build the latest PolyVox from download page and I ran into this error when building the solution in VS2008, is there a fix for it? -

Code:
Error   1   error C2782: 'PolyVox::Vector<Size,Type> PolyVox::operator /(const PolyVox::Vector<Size,Type> &,const Type &) throw()' : template parameter 'Type' is ambiguous   c:\Users\Andrew\Downloads\PolyVox-GIT-2e4bf67\examples\OpenGL\Shapes.cpp   33   OpenGLExample


Last edited by drwbns on Thu Jan 12, 2012 3:04 pm, edited 1 time in total.

Top
Offline Profile  
Reply with quote  
 Post subject: Re: Compiler errors in opengl example project
PostPosted: Wed Jan 11, 2012 8:57 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
I'm not sure why it's ambiguous... can you try replacing:

Code:
//This vector hold the position of the center of the volume
Vector3DInt32 v3dVolCenter = (volData.getEnclosingRegion().getUpperCorner() - volData.getEnclosingRegion().getLowerCorner()) / 2;


with:

Code:
//This vector hold the position of the center of the volume
Vector3DInt32 v3dVolCenter = (volData.getEnclosingRegion().getUpperCorner() - volData.getEnclosingRegion().getLowerCorner());
int32_t divisor = 2;
v3dVolCenter = v3dVolCenter / divisor;


Does it give the same error?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Compiler errors in opengl example project
PostPosted: Thu Jan 12, 2012 3:03 pm 

Joined: Wed Jan 11, 2012 7:33 pm
Posts: 109
Yes, that worked. But why?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: [Resolved]Compiler errors in opengl example project
PostPosted: Thu Jan 12, 2012 4:09 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
I don't exactly know... can you change it back to how it was, rebuild, and give me the full compiler output (not just the list of errors)? I think in there it should say what the candidates are.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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