Compiling for Windows 7, VS2010
Jeremy Selan <jeremy...@...>
My apologies that compilation is not easier on windows.
toggle quoted message
Show quoted text
Our choice to use an external shared_ptr, in retrospect, makes portability more challenging than it need be; this is one of our top priorities to address next year. Along these lines, distributing OCIO precompiled binaries as 'system installs' is one of my major goals for next year. This would take a huge step forwards for allowing people to upgrade their OCIO system library version to alleviate apps that ship with older library versions.
Currently in our CMake install, it appears we DO require the use of boost on windows for access to ptr: # Use boost's shared_ptr by default on Windows (as <VS2010 doesn't have it),
# Use std::tr1::shared_ptr by default on other platforms option(OCIO_USE_BOOST_PTR "Set to ON to enable boost shared_ptr (necessary when tr1 is not available)" WIN32)
However, reading the docs online it's pretty clear that both VS2010 and 2012 DO include a ptr: So you have two options to try: - install boost, and then compile with OCIO_USE_BOOST_PTR 1 - dont install boost, and path the OpenColorABI.h to define the ptr from the proper location
(in this case, the code would look something like... #if OCIO_USE_BOOST_PTR #include <boost/shared_ptr.hpp> #define OCIO_SHARED_PTR boost::shared_ptr
#define OCIO_DYNAMIC_POINTER_CAST boost::dynamic_pointer_cast #elif __GNUC__ >= 4 #include <tr1/memory> #define OCIO_SHARED_PTR std::tr1::shared_ptr #define OCIO_DYNAMIC_POINTER_CAST std::tr1::dynamic_pointer_cast
<NEWCODE> #elif (_MSC_VER > 1600) #include <memory> #define OCIO_SHARED_PTR std::shared_ptr #define OCIO_DYNAMIC_POINTER_CAST std::dynamic_pointer_cast
</NEWCODE> #else #error OCIO needs gcc 4 or later to get access to <tr1/memory> (or specify USE_BOOST_PTR instead) #endif -- Jeremy On Wed, Nov 7, 2012 at 11:22 AM, Andrew Britton <cbsd....@...> wrote: Good afternoon, |
|