Very long compilation time?

About Monkey 2 Forums Monkey 2 Programming Help Very long compilation time?

This topic contains 10 replies, has 6 voices, and was last updated by  Mark Sibly 9 months, 2 weeks ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
  • #13856


    I’m not a programmer, but I’m worried about something I don’t know. When I come from Blitz3D, BlitzMax, and set my feet on Monkey2, I see that a simple program takes a long time to be compiled in Monkey 2 compared to the other engines, this is hopeless for me, and I would like to learn why this happens. Or if there is a configuration I’m ignoring.

    Kind regards.



    This is mainly due to the fact that gcc(mingw) is slow.
    Something else is that it compiles all modified files, so if you split well all your code in well structured files, you will gain compile time.
    The first two compiles are always slow though, so compiling demos just to see them will always take time. When you work on a project you don’t have the problem anymore.

    You can use MSVC as your compiler (by installing free msvc studio 2017 community). It’s way faster than gcc.
    Once installed you have to modify one/two parameters in env_windows.txt in bin dir:

    and if you want 64bit exe (only available with msvc):



    Yeah in some sense Blitz3D was “interpreted” language since the code turned into objects that run in the C++ engine. Blitzmax on the other hand was converted to assembly (fasm) so it would be considerably more optimized code rather than other high level source (such as C++). Monkey2 on the other hand is compiled as C++ source code.

    However is MSVC considerably faster than gcc? I havent tried it yet though but I am interested too in trying it.



    Hi, I installed Visual Studio, however I have these bugs. Any suggestions?





    Abe _King_

    If I had to take a guess I believe that means you haven’t rebuilt your modules?

    @yue open the folder “scripts” in a command line then run “rebuildall2go”

    @cocon Yes MSVC is faster, marginally so, but its speed really only shines when recompiling – which is a time saver.



    Hello, here’s the problem.


    Abe _King_

    @yue I still think it is missing your modules. Have you rebuilt all modules?

    scripts > rebuildall2go

    Edit: sorry,

    Well I am not certain anymore that is the case. I think other’s have had a problem with file access rights so that might be the cases here . . .



    Yes. But the problem continues.



    Okay, this is working. And it is evident that the compilation time is much shorter.

    Thank you all for your help. 🙂



    MSVC is definitely way faster, well worth the effort to set up if you’re on Windows!


    Mark Sibly

    What did you do to get it working?

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

You must be logged in to reply to this topic.