Exocortex / ExocortexCrate

http://exocortex.com/products/crate
BSD 3-Clause "New" or "Revised" License
134 stars 68 forks source link

VS2013 Compile? #19

Open simoneves opened 9 years ago

simoneves commented 9 years ago

Before I try, is there any way to get the current distribution to compile with VS2013?

Obviously it's trivial to make a new .bat file to invoke CMake with "VIsual Studio 12" but without "vc120" versions of all the dependent Libraries, I suspect the build will fall over pretty quickly...

...or will it?

simoneves commented 9 years ago

Also, the various conditionals on MSVC10/11 in the master CMakeLists.txt file need a MSVC12 branch.

simoneves commented 9 years ago

To be clear, I am aware that there is no need to support VS2013 for any of the existing client app builds, but we would like to integrate direct Crate reading into some in-house apps which are built with VS2013.

simoneves commented 9 years ago

More concerning is the Exocortex component of the Libraries distribution, which contains what I presume are still-binary-only proprietary stuff that I couldn't rebuild myself even if I wanted to.

simoneves commented 9 years ago

Or perhaps not, having now read the "OSX Port" thread, in which you removed the dependency on the Exocortex, TBB and RLM libraries, and the implication from that is that the only remaining external dependencies are Boost 1.44 and Zlib, both of which should be buildable manually with VS2013.

Please advise.

simoneves commented 9 years ago

...reinforced by the only references to the Libraries distribution (via $LIBRARY_ROOT) in the CMake scripts being for Boost and for the app libraries (Maya, Max, XSI, Arnold, Python). As I don't need 2013 versions of any of those (and presumably none but Python would build anyway, for the reverse reason) I shall just try building my own Boost 1.44 with VS2013 (using the instructions you provided in the OSX Port thread) and drop it in and see what happens... :)

bhouston commented 9 years ago

@simoneves:

https://github.com/Exocortex/ExocortexCrate/blob/master/CMakeLists.txt#L293

I believe that is it. :)

If you have boost redistributables for Windows VC2013 I can include them in the Libraries distribution so no one else has to build them. I will also merge any pull requests you do that add VC2013 support. :)

This is amazing!

simoneves commented 9 years ago

Thanks, Ben. I'll get on this today, and of course happy to contribute my changes back, once I work out how to actually do a Pull Request in this GitHub thing! ;)

simoneves commented 9 years ago

So I tried to do a VS2013 build of Boost 1.44. I ran the stock bootstrap.bat in a VS2013 command shell, which seemed to make bjam.exe fine, and then I ran the batch file I made per your BUILDING_BOOST readme, with appropriate substitutions (most notably, toolset=msvc-12.0).

Firstly, it complained that it didn't know about "wserialization" in order to omit it, so I removed that part of the command line (I was just doing the 64-bit one).

Then it seemed to work, although something went by in the log which made me think it had fallen back to the VS2010 toolchain anyway, even though it happily made a set of vc120.lib files.

I dropped those into Libraries/boost/lib/x64 and then tried to build Crate with VS2013, after making a suitable CMake invocation script.

Oh, first I modified the master CMakeLists.txt to add logic for MSVC12.

I got errors in four files in the Abc code to do with std::min/max, which apparently aren't visible by default any more, but adding...

ifdef _MSC_VER

if _MSC_VER >= 1800

include

endif

endif

...fixed those, along with my addition of std::string prefix to CommonImport.h/IJobStringParser as described in my "VS2012 Build Failure" thread.

Crate seemed to build, although the CMake MSVC12 changes basically omitted any of the real clients, so I suspect although it all compiles, there is a link failure waiting to happen when those Boost libs turn out to be the wrong ABI despite their name.

More when I know it.

simoneves commented 9 years ago

VS2013 is only officially supported by Boost >= 1.56 (i.e. the last two versions)

Does Alembic/Crate work with the latest Boost, or does it really require 1.44 (or no more than 1.48, as implied by the perhaps-old docs)

simoneves commented 9 years ago

To the bit about "wserialization" two posts back. It's from a typo in the BUILDING_BOOST.md file which I cut-and-pasted without noticing. The option should be "--without-serialization".

Awaiting a VS2013 Boost 1.57 build to try it...

Misterdudeman commented 5 years ago

Hi Simon, I wanted to check if you ever figured out a solution for this as I was wanting to try compiling Crate for Maya 2018 which does seem to require Boost 1.61 and VS2015. Thanks!

simoneves commented 5 years ago

@Misterdudeman , I'm afraid I have no recollection either way. That was two jobs ago. Sorry... :(