POV-Ray : Newsgroups : povray.beta-test : Compile errors with VS 2005 on Windows XP : Re: Compile errors with VS 2005 on Windows XP Server Time
29 Jul 2024 19:15:27 EDT (-0400)
  Re: Compile errors with VS 2005 on Windows XP  
From: Christian Froeschlin
Date: 29 Mar 2009 14:38:32
Message: <49cfc028@news.povray.org>
Chris Cason wrote:

> madiyaan damha wrote:
>> I downloaded povray source code for windows and am trying to build it on windows
>> xp using visual studio 2005. I installed boost 1.37 using boostpro's installer.
>>
>> I am getting the following errors while building the unmodified source code:
> 
> Please let me know if you resolve this.

Has there been any news on this? Just downloaded sources for beta 31
and encountered the same problem (that is using express and separate
platform SDK, but as the OP has the full version that should not be
the issue here). The last version I compiled myself was beta24 with
boost 1.34 which worked fine. Also, if I modify the beta24 project
to use boost 1.37 I get the same errors so I'm fairly certain the
changed behavior is related to the boost header files.

Regarding bad timing with including windows.h, I suspect
the following chain causes the problem:

   boost/thread.hpp
   boost/thread/thread.hpp
   boost/thread/win32/thread_data.hpp
   boost/thread/thread_time.hpp
   boost/date_time/microsec_time_clock.hpp
   C:\Program Files\Microsoft Platform SDK\Include\windows.h

The file thread_time.hpp is new in 1.37.

Frankly, I don't understand at all how this boost configuration
works. In microsec_time_clock.hpp the code specified is actually

   #ifdef BOOST_HAS_FTIME
   #include <windows.h>
   #endif

but I don't find any place where BOOST_HAS_FTIME is #define'd.
If I try to hack an #undef into the code it has either no effect
or causes error C2039: 'microsec_clock' : is not a member of
'boost::date_time' depending on where I insert it.

Note: The different behavior may be caused by using the BoostPro
installer package for win32 http://www.boostpro.com/products/free which
is the recommended way to get boost according to the getting started
http://www.boost.org/doc/libs/1_35_0/more/getting_started/windows.html
in the boost documentation. I just noticed the Beta31 readme does not
mention this and recommends your own package or to build from source.

Finally, isn't the actual problem that there are name collisions
between the POV Code and Platform Includes? Wouldn't the solution
be to replace, e.g., IStream with pov_base::IStream instead of
depending on the include location of windows.h?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.