Compile using MSCV

About Monkey 2 Forums Monkey 2 Programming Help Compile using MSCV

This topic contains 11 replies, has 4 voices, and was last updated by  nerobot 1 year, 8 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #9677

    Hezkore
    Participant

    (Read Update at the bottom)

    How do I get Monkey2 to use MSCV properly?
    I know I need to set MX2_USE_MSVC to 1 in ‘env_windows.txt’
    But what am I supposed to install?
    I’ve installed Visual Studio Community 2017 and a bunch of build tools, but it still errors out every time I try to compile.

    It says ‘corecrt.h’ isn’t found, which is true, it’s not located there.
    It’s in ‘C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt\’
    I’ve added that path to ‘INCLUDE’ but it still errors out

     

    UPDATE: Alright so instead of adding that path, I went over and changed all old version numbers in ‘env_windows.txt’ to my 15063 version.
    And it does seem to compile some things.. but Ted2Go for example does not compile.

    #9684

    Simon Armstrong
    Participant

    Regarding your linking issue, I closed this issue but perhaps it is still pertinent.

    #9686

    Mark Sibly
    Keymaster

    Weirdly, I have never had the link error. MSVC was intended to be used with msvc 2015 express not community 2017, so I thought it might be that, but I just tried changing the msvc paths to Hezkore’s (already had community 2017 installed), rebuilt all modules, and still no problem, can build anything including ted2go just fine.

    Will add the libadvapi import to SDL2 though for the next release.

    #9689

    Hezkore
    Participant

    Yup, MSCV works now.
    I’m not sure compile times improved though…
    Is there anything else I can do to improve compile times?

    #9690

    Mark Sibly
    Keymaster

    Is there anything else I can do to improve compile times?

    Nope.

    #9691

    Hezkore
    Participant

    Well haha, fair enough!

    #9693

    Simon Armstrong
    Participant

    Faster hardware might help?

    I am on latest KabyLake I3 with SSD and DDR4 ram at +2GHZ and finding MSVC compile times very good although I suppose that is subjective.

    #9694

    Hezkore
    Participant

    I’m on a 8 core 4.5GHz processor with 16Gb RAM, using 4 SSDs in Raid 0.
    It takes 15-20 seconds to compile my largest project. :/
    BlitzMax compiles roughly the same thing at a few seconds.

    #9695

    Mark Sibly
    Keymaster

    After the first couple of  builds, compile times are OK here but then I’m used to c++. Linking is the slowest step and MSVC speeds that up a lot for me.

    With ted2go (after a couple of builds) and after changing a single file, parsing, semanting, translating, compiling are 3-ish seconds, linking is 15-ish. Changing more files increases compile times. Making different changes also affects compile times.

    With MSVC, link time goes down to just a few seconds, so build time goes from 18-ish seconds to 5 ish seconds.

    Also possibly worth noting, if you’re using the ‘mega file’ approach of sticking all your code in one file, then yes, compile times will hurt!

    #9705

    nerobot
    Participant

    Is it possible to use any kind of “portable msvc” (does it exist or not) to avoid installing vstudio?

    #9706

    Simon Armstrong
    Participant

    There is some info here on that topic, interested in how you get on.

    #9709

    nerobot
    Participant

    Thanks, Simon.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.