POV-Ray : Newsgroups : povray.programming : Compiling 3.7 RC7 with Visual Studio Express 2012 Server Time: 19 Aug 2019 14:35:46 GMT
  Compiling 3.7 RC7 with Visual Studio Express 2012 (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: scott
Subject: Compiling 3.7 RC7 with Visual Studio Express 2012
Date: 5 Jun 2013 12:03:09
Message: <51af28fd$1@news.povray.org>
There are a few steps I needed to take to get this to work correctly. 
This isn't necessarily the best way or the only way, it's simply what I 
did to get it working.

1. Open the solution in the windows\vs10 folder with VS Express 2012
2. Choose “Update” to update all the projects
3. Open the configuration manager, uncheck the Build option for cmedit, 
codemax and console (you'll need to do this for the combination of 
debug/release and 32bit/64bit that you want to build)
4. Do a find&replace on all files to replace “boost::shared_ptr” with 
“shared_ptr”
5. Do a find&replace on all files to replace “shared_ptr” with 
“boost::shared_ptr”
6. Open syspovconfig.h from the VFE\vfewin project and fix line 122 
(gets messed up with steps 4 and 5), it should read #include 
<boost/shared_ptr.hpp>
7. Open msvc.h from the VFE\vfewin project and delete the #error on line 
164 and copy the #defines from the previous #elif in its place (and you 
can change the 10’s to 11’s if you want)
8. For the toFloat, eLut and b44ExpLogTable projects under OpenEXR 
Libraries; open the project properties and under Custom Build Step set 
Execute After to BscMake
9. Open unordered_map.hpp from the Generic POV-Ray\povbackend project 
(it’s under External Dependencies) and add the following #define 
BOOST_NO_0X_HDR_INITIALIZER_LIST at line 11

It should build now.


Post a reply to this message

From: Todd Carnes
Subject: Re: Compiling 3.7 RC7 with Visual Studio Express 2012
Date: 18 Jun 2013 01:05:42
Message: <51bfb266$1@news.povray.org>
On 6/5/2013 8:03 AM, scott wrote:
> 4. Do a find&replace on all files to replace “boost::shared_ptr” with
> “shared_ptr”
> 5. Do a find&replace on all files to replace “shared_ptr” with
> “boost::shared_ptr”

Doesn't step 5 just reverse step 4? What do you gain by doing this?

Todd


Post a reply to this message

From: scott
Subject: Re: Compiling 3.7 RC7 with Visual Studio Express 2012
Date: 18 Jun 2013 07:13:22
Message: <51c00892$1@news.povray.org>
>> 4. Do a find&replace on all files to replace “boost::shared_ptr” with
>> “shared_ptr”
>> 5. Do a find&replace on all files to replace “shared_ptr” with
>> “boost::shared_ptr”
>
> Doesn't step 5 just reverse step 4? What do you gain by doing this?

It makes sure all mention of "shared_ptr" is prefixed by "boost::". It 
was just the first way of doing it that came into my head when I opened 
the Find&Replace window in VS. There's probably a way to do it in one 
step with a regex or something (which would remove the need for step 6).


Post a reply to this message

From: clipka
Subject: Re: Compiling 3.7 RC7 with Visual Studio Express 2012
Date: 17 Jul 2013 03:08:26
Message: <51e60aaa$1@news.povray.org>
Am 18.06.2013 03:05, schrieb Todd Carnes:
> On 6/5/2013 8:03 AM, scott wrote:
>> 4. Do a find&replace on all files to replace “boost::shared_ptr” with
>> “shared_ptr”
>> 5. Do a find&replace on all files to replace “shared_ptr” with
>> “boost::shared_ptr”
>
> Doesn't step 5 just reverse step 4? What do you gain by doing this?

It effectively replaces "shared_ptr" with "boost::shared_ptr", but 
without any already existing "boost::shared_ptr" getting converted to 
"boost::boost::shared_ptr"


Post a reply to this message

From: atlaste
Subject: Re: Compiling 3.7 RC7 with Visual Studio Express 2012
Date: 25 Jun 2015 18:25:00
Message: <web.558c470a527de37e6d0f10450@news.povray.org>
scott <sco### [at] scottcom> wrote:
> There are a few steps I needed to take to get this to work correctly.
> This isn't necessarily the best way or the only way, it's simply what I
> did to get it working.
>
> [... step 1-9 ...]

Just tried it with VS2013. Still doesn't build, you need a few more steps for
that. Here's the stuff you need in addition to the earlier steps:

10. Fix msvc.h:

  #elif _MSC_VER >= 1800 && _MSC_VER < 1900
 #define COMPILER_VER                      ".msvc13"
 #define METADATA_COMPILER_STRING          "msvc 13"
  #else

11. Search for 'using std::min'. Above the 'namespace', add '#include
<algorithm>'.

Build, done.


Post a reply to this message

From: clipka
Subject: Re: Compiling 3.7 RC7 with Visual Studio Express 2012
Date: 25 Jun 2015 21:43:39
Message: <558c760b$1@news.povray.org>
Am 25.06.2015 um 20:23 schrieb atlaste:
> scott <sco### [at] scottcom> wrote:
>> There are a few steps I needed to take to get this to work correctly.
>> This isn't necessarily the best way or the only way, it's simply what I
>> did to get it working.
>>
>> [... step 1-9 ...]
>
> Just tried it with VS2013. Still doesn't build, you need a few more steps for
> that. Here's the stuff you need in addition to the earlier steps:
>
> 10. Fix msvc.h:
>
>    #elif _MSC_VER >= 1800 && _MSC_VER < 1900
>   #define COMPILER_VER                      ".msvc13"
>   #define METADATA_COMPILER_STRING          "msvc 13"
>    #else
>
> 11. Search for 'using std::min'. Above the 'namespace', add '#include
> <algorithm>'.
>
> Build, done.

Thanks for sharing.

I presume you're not actually trying to build RC7 anymore, but some 
newer version, right?


Post a reply to this message

From: atlaste
Subject: Re: Compiling 3.7 RC7 with Visual Studio Express 2012
Date: 10 Jul 2015 19:40:00
Message: <web.55a01ead527de37e6d0f10450@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> I presume you're not actually trying to build RC7 anymore, but some
> newer version, right?

Yes, latest version.

I'm now in the process of simply forking it and making the changes there;
otherwise this story will repeat itself every time. I hope to check it in
somewhere today.


Post a reply to this message

From: atlaste
Subject: Re: Compiling 3.7 RC7 with Visual Studio Express 2012
Date: 10 Jul 2015 21:35:01
Message: <web.55a039f3527de37e6d0f10450@news.povray.org>
"atlaste" <nomail@nomail> wrote:
> clipka <ano### [at] anonymousorg> wrote:
> > I presume you're not actually trying to build RC7 anymore, but some
> > newer version, right?
>
> Yes, latest version.
>
> I'm now in the process of simply forking it and making the changes there;
> otherwise this story will repeat itself every time. I hope to check it in
> somewhere today.

Actually it turned out to be quite a bit more complicated than this
description... :-(

It now works, I've also added a new camera just for the fun of it. I've also
changed a ton of boost::tr1 to std; that's how it should be anyways if you're
using 'using' throughout the solution.

Latest version fork can be found here: https://github.com/atlaste/povray . I'll
make a pull request, hopefully they'll pick it up.


Post a reply to this message

From: clipka
Subject: Re: Compiling 3.7 RC7 with Visual Studio Express 2012
Date: 11 Jul 2015 04:18:18
Message: <55a0990a$1@news.povray.org>
Am 10.07.2015 um 23:32 schrieb atlaste:

> I've also
> changed a ton of boost::tr1 to std; that's how it should be anyways if you're
> using 'using' throughout the solution.

Wait... what?

There's not a single "boost::tr1" in the code.

If you're referring to the "boost/tr1/*.hpp" include files, and/or the 
use of namespace "tr1::" where C++11 now has the same functionality as 
"std::", - by all means leave them be:

(1) POV-Ray is /not/ written in C++11; it is written in C++03/TR1. 
Consequently, the TR1 functionality should /not/ be accessed via the 
namespace where it resides in C++11, but via the original "tr1::" namespace.

(2) This is a deliberate decision, aimed at providing maximum 
portability. To my knowledge, all contemporary C++11 compilers also 
still support the "tr1::" namespace.

(3) The use of "boost/tr1/*.hpp" instead of the corresponding TR1 header 
files is also deliberate, in order to provide compatibility with pre-TR1 
C++03 compilers. The boost/tr1 header files are stubs that pull in 
either the compiler's own TR1 headers (if available), or map boost's 
implementations of the same functionality into the "tr1::" namespace. 
Likewise, it can be expected that future versions of those header files 
will also pull in from "std::" of any C++11 compilers that cease to 
natively support the "tr1::" namespace.


Post a reply to this message

From: atlaste
Subject: Re: Compiling 3.7 RC7 with Visual Studio Express 2012
Date: 13 Jul 2015 17:45:01
Message: <web.55a3f7f7527de37e6d0f10450@news.povray.org>
> Wait... what?
>
> There's not a single "boost::tr1" in the code.

Well, yes and no. There a bunch of 'using' statements in the code, that are the
root cause of the issues I had yesterday. I cannot recall the details to be
honest - then again, I also didn't plan for fixing compiler errors for hours on
end. My original intention was to leave it all alone; until my latest port
yesterday that worked just fine here.

Unfortunately, yesterday something changed that made it impossible for me to do
the above 'tricks', due to name conflicts in boost::tr1:: and std:: . Deliberate
or not, the fact is that it didn't work anymore.

I guess that a better solution would be to use a #define with a namespace based
on the compiler; still, I didn't really feel like making such a huge change
yesterday.

If you browse through my changes, you'll notice that I I haven't changed the
boost libraries themselves and only changed a handful of things. From the top of
my mind:

- std::smart_ptr
- std::vector
- std::bind, std::placeholder::_*

All of these are well supported iirc, and I've checked the features that are
used for incompatible use. Still, if you know a better solution than my
solution, please be my guest.


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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