Making MSVC portable

Home Forums Monkey 2 Programming Help Making MSVC portable

This topic contains 9 replies, has 4 voices, and was last updated by  Simon Armstrong 1 week ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #10406


    I move between a lot of computers, and I generally don’t like things that places files all over my computer.
    And MSVC has always caused a lot of trouble for me when it comes to this.
    So I’ve tried to get it portable by just copying the needed stuff into the Monkey 2 ‘devtools’ folder and edit the env txt.

    I’ve got it working, but there’s an annoying problem with it only working with ‘fresh’ compiles.
    Basically, you can compile once with MSVC in Ted2Go, but if you edit the code and try to compile again, it’ll complain about g++ not existing.

    Perhaps anyone can help me with that?

    You can grab my portable MSVC pack over at:
    All you have to do it unpack it in your ‘devtools’ folder and set the path in ‘env_windows.txt’
    Here’s a simple 3 step guide, with an easy copy-paste config for ‘env_windows.txt’:

    UPDATE: This now works perfectly fine.
    So feel free to use this.


    Mark Sibly

    The MSVC version still needs g++ to generate dependancies, so you’ll need this in devtools too.



    Alright, I’ve figured it out.
    Turns out I forgot ;${PATH} at the very end! 🙂


    Mark Sibly

    Is your bin/env_windows.txt file correct, or have you set system PATH to mingw binaries?

    Can you dump bin/env_windows.txt file here, along with full path to devtools.



    Sorry Mark
    Read my previous post, I’ve updated it 🙂


    Mark Sibly

    Turns out I forgot ;${PATH} at the very end!




    I get the following error:


    Mx2cc version 1.1.06

    ***** Making module ‘assimp’ *****

    c:\monkey2-v1.1.06\modules\assimp\assimp\contrib\zlib\gzguts.h(29): fatal error C1083: Cannot open include file: ‘unistd.h’: No such file or directory
    Build error: System command ‘cl -c -EHs -W0 -MT -Ox -DNDEBUG -I”C:/Monkey2-v1.1.06/modules/” -I”C:/Monkey2-v1.1.06/modules/monkey/native” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/include/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/code/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/unzip/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/irrXML/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/rapidjson/include/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/openddlparser/include/” -Fo”C:/Monkey2-v1.1.06/modules/assimp/assimp.buildv1.1.06/windows_release_msvc/build/_1_1_1assimp_2contrib_2zlib_2gzclose.c.obj” “C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/zlib/gzclose.c”‘ failed.

    cl -c -EHs -W0 -MT -Ox -DNDEBUG -I”C:/Monkey2-v1.1.06/modules/” -I”C:/Monkey2-v1.1.06/modules/monkey/native” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/include/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/code/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/unzip/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/irrXML/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/rapidjson/include/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/openddlparser/include/” -Fo”C:/Monkey2-v1.1.06/modules/assimp/assimp.buildv1.1.06/windows_release_msvc/build/_1_1_1assimp_2contrib_2zlib_2gzclose.c.obj” “C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/zlib/gzclose.c”

    Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x86

    Copyright (C) Microsoft Corporation. All rights reserved.



    ***** Fatal mx2cc error *****

    Internal mx2cc build error

    Update modules failed.
    Total time elapsed: 0 m 0 s.



    That doesn’t seem to be related to my portable MSVC since ‘unistd.h’ comes with emscripten and mingw.
    Make sure you have the Mingw-6.2.0 build tools for Windows along with Emscripten-1.37.9 build tools for Windows if you’re trying to compile for those.
    You can find those under ‘Files’ here on the this webpage, though Mark hasn’t updated the links names to this webpage so you’ll have to correct that yourself heh.


    Mark Sibly

    This has been fixed in more recent versions of monkey2. There’s a new binary build on its way – this week sometime for sure!


    Simon Armstrong

    As MSVC user I got a bit confused with upgrading monkey2 until the penny dropped that I would need to change some paths in common.bat to have _msvc suffix

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

You must be logged in to reply to this topic.