How to compile Mangos and Scriptdev2 on Windows

So basically this is a guide on compiling mangos and scriptdev2 which is a request from Spencer (which is i’m grateful for, because well you know after a long time without writing, i just don’t know where to start again) :). But anyway what’s done is done and i’ve decided that perhaps rewriting the guide is a good idea (although i’m no longer using Mangos or other WoW Emulator). But of course this time it would be different because everything is going to be straight forward without making the guide cluttered like the old version (i think)

Anyway to make things fast for you, let’s start the guide on how to compile mangos plus scriptdev2 on Windowsbut as a side note, before we begin, this guide is tested on Windows Vista with UAC Enabled, so if you’re running Windows XP then there should be no problem for you, as for Windows 7 user unfortunately i don’t have Windows 7 yet but i think it’s just the same as Vista

Requirements

MSYSGitDownload MSYSGit

This is needed in order to get the mangos source and also make updating the source much easier and make sure to get the Full Installer for official GIT

TortoiseSVNDownload TortoiseSVN

This is needed in order to get ScriptDev2 source and also updating the source

Visual Studio Express 2008 SP1Download Visual Studio Express

Make sure to download Visual Studio Express 2008 SP1 offline Install ISO Image (748MB) that contains everything to make things much easier, and beside this guide is tested only on Visual Studio Express 2008 SP1

Note: You should use Visual Studio 2010 SP1 instead of VS2008, but make sure to use mangosdVC100.sln for mangos and scriptVC100.sln for the scriptdev2 if you use VS2010

MagicISO Virtual CD/DVD-ROMDownload MagicISO

This is needed to mount the ISO Image file so you can start the installation, but if you already have other Virtual CD program installed then there’s no need to download this

Installation

1. Install MagicISO for the first step

2. Mount Visual Studio Express 2008 SP1 Image by right clicking on MagicISO tray icon, then choose Virtual CD/DVD-ROM, then Mount Image

3. Then choose to install Visual C++ only

Visual Studio Express 2008 ISO

Visual Studio Express 2008 Setup

VS Express 2008 Install Path

4. After finished with VS Express installation then you need to install MSYSGit

MSYSGIT Install Path

In Windows Vista it’s necessary to install GIT to other directory than Program Files if UAC enabled, so in this example i installed it to C:\Git

5. Install TortoiseSVN (because TortoiseSVN installation is straight forward i don’t think i need to put image as an example) :)

Downloading Mangos and Scriptdev2 Source

1. Run GIT Bash from start menu and type

cd /c

Then type (choose only one repository from below)

Note: Links to the repositories updated. Thanks to Antz for mentioning this :)

- Wow Classic
git clone git://github.com/mangoszero/server.git mangos-git

- Wow BC
git clone git://github.com/mangosone/server.git mangos-git

- Wow WotLK
git clone git://github.com/mangos-wotlk/server.git mangos-git

- Woe Cataclysm
git clone git://github.com/mangos/server.git mangos-git

Mangos Git download

in this example i choose to download mangos to C:\mangos-git, but you can change the path if you want

Because Scriptdev2 now uses GIT as mentioned by stankyfish at the comment area below and also by one of this blog visitor via email to me. You can ignore step #2 in this process and because they’re using GIT you can use the same method like when you clone mangos source above but don’t forget to change the command like below

Note: Depending on which Mangos repository you choose earlier, you need to use the matching Scriptdev2

- WoW Classic
git clone git://github.com/scriptdev2/scriptdev2-classic.git scriptdev2

- WoW TBC
git clone git://github.com/scriptdev2/scriptdev2-tbc.git scriptdev2

- WoW WoTLK
git clone git://github.com/scriptdev2/scriptdev2.git scriptdev2

- WoW Cataclysm
git clone git://github.com/scriptdev2/scriptdev2-cata.git scriptdev2

2. Now you need to open Windows Explorer and then right click on empty area and then choose SVN Checkout to download Scriptdev2 source and then type

http://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2

as the repository URL

scriptdev2 checkout url

scriptdev2 checkout done

Compile Mangos

1. Open mangosdVC90.sln inside win directory in mangos-git directory

mangos vc9 solution file

2. Change the build configuration to Release and if you’re trying to build the x64 version make sure to change the Win32 to x64 as well

mangos build config to release

3. Click on Build and then choose Rebuild Solution

mangos rebuild solution

4. Done …

mangos compile done

Compile Scriptdev2

1. Copy the entire scriptdev2 directory to mangos-git\src\bindings

copy scriptdev2 to src bindings

2. Just like before, open scriptVC90.sln and then set the build configuration to release and if you’re trying to build the x64 version make sure to change the Win32 to x64 as well

set scriptdev2 to release

3. Then choose Build -> Rebuild Solution

rebuild scriptdev2

4. And done …

scriptdev2 compile done

Updating Mangos and Scriptdev2

Okay so we’re done with the compile process, but what if you want to update your Mangos Source later? … well all you have to do is just type

cd /c/mangos-git

and then type

git pull

update mangos source using git

And you’re done updating mangos. As for updating Scriptdev2, all you have to do is just right click on Scriptdev2 folder and then choose SVN Update

And so …

You’re done compiling mangos, the compiled binary can be found at the Bin directory inside mangos-git directory. The rest is of course to configure mangos and scriptdev2 itself, if you need help on how to configure mangos please check my new mangos configure guide

Comment?

Note: Comment may not appear right away.

165 comments on “How to compile Mangos and Scriptdev2 on Windows

  1. I compiled the Mangos with no problem, but scriptdev2 fails to compile.

    1>ScriptDev2 – 236 error(s), 1 warning(s)
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

    Any chance of help?

  2. Hi,
    Thanks for all the effort with the guide.
    I’m getting the following error:
    “C:\InstallLocation\magnos-git\src\bindings\scriptdev2\include\sc_creature.h(225): error C3861: ‘SetCombatMovement’: identifier not found”
    When trying to rebuild ScriptDev2. Any idea what could be causing this?
    Thanks.

  3. 1>—— Rebuild All started: Project: ScriptDev2, Configuration: Release x64 ——
    1> Extracting revision
    1> precompiled.cpp
    1>C:\server\dep\ACE_wrappers\ace/OS_NS_unistd.inl(1016): warning C4244: ‘argument’ : conversion from ‘ssize_t’ to ‘int’, possible loss of data
    1>c:\server\src\bindings\scriptdev2\include\sc_creature.h(225): error C3861: ‘SetCombatMovement’: identifier not found
    1>c:\server\src\bindings\scriptdev2\include\sc_instance.h(62): error C2061: syntax error : identifier ‘AchievementCriteriaTypes’
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
    Any idea what this means? this is the only step i can’t get pass. Thanks in advance

    1. Are you downloading Scriptdev2 from their SVN address? if yes, you need to use GIT to download as described in the Downloading Mangos and Scriptdev2 source part because they’ve moved to GIT

      Also if you’re running Visual Studio Express, you can only build 32 bit binaries only because 64 bit binaries only supported on the Pro version

    2. Yeap, i got it after looking around. Thanks. Is there any way i can contact you if i run into further problems?

  4. I am having trouble with getting Mangos, everytime I enter the code git clone, it says.
    “Cloning into ‘mangos.git’…
    fatal: remote error:
    Repository not found.
    Any help would be appreciated.

    1. hey, thank u for these info to create wow 3.3.3 server
      but I think you should change information about how to combile mangos…

    2. @Michael

      Sorry for the delay in response, to answer your question, i think they have switched their repository again. I’d suggest you to head over to getmangos.com to get their new repository url

      @Baha

      Actually the page that you linked to is not a how to guide but it is an automated script. Basically what you need to do to compile mangos if i have to summarized it (it has been like this since a loooong time ago)

      1. Download mangos source, and optionally get Scriptdev2 (make sure to check their repository urls first because there’s a chance they’ve switched to new address)
      2. Put scriptdev2 in bindings directory
      3. Open Mangos source in Visual Studio, set it to Release and then build and then do the same thing with scriptdev2
      4. Done :D

  5. Im having trouble with installing the MaNGOS source directory, on step 2. When I type in what it says in the git Bash it says;

    “Cloning into ‘mangos-git’
    fatal: remote error:
    Repository not found.”

    I have everything installed already, Microsoft Visual Studio 2010, TortoiseSVN, MySQL, Github, but wont work.

  6. I do all the steps here and at the end there is no Bin directory showing up in my mangos-git folder please help!

  7. Oh and I would love to take the time out and say that this error here.
    1>—— Rebuild All started: Project: ScriptDev2, Configuration: Release Win32 ——
    1>Deleting intermediate and output files for project ‘ScriptDev2’, configuration ‘Release|Win32’
    1>Extracting revision
    1>The system cannot find the path specified.
    1>Project : error PRJ0019: A tool returned an error code from “Extracting revision”
    1>Build log was saved at “file://c:\mangos-git1\src\bindings\VC90\ScriptDev2__Win32_Release\BuildLog.htm”
    1>ScriptDev2 – 1 error(s), 0 warning(s)
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

    means that you should really state to every one hey you might get a error message lmao or at least try and explain that if you get this error here is how you fix it. lmao. anyways not really sure yet how to fix it but I am working on that now and once i find out I will once again post

    1. Did you put scriptdev2 directory in c:\mangos-git\src\bindings (so it ends up as c:\mangos-git\src\bindings\ScriptDev2) ?

      Note: adjust the mangos-git to your mangos source directory if you didn’t put it at C:\mangos-git

  8. oh and I must also add that the url http://www.microsoft.com/express/Downloads that you gave for the viual C++ 2008 is invalid as well it will take you to the visual studio 2010 page lol. Let me provide you with the correct url which is this one http://blogs.msdn.com/b/wriju/archive/2007/11/21/visual-studio-2008-express-iso-image-download.aspx now that is the one you guys are needing. Just so there is no real confusion.

    Edited: to merge this link he posted after this – http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express

    1. I would recommend anyone that read this to use Visual Studio 2010 instead as i stated on my previous reply

  9. Let me also add that if would also be nice to know if using these to run wow fully work. Like does quest work instances and raids? Or is it a beta like half working and half not. you did leave that out also. Suggestion from a programmer here. When doing a guide you should put all information and all details in the guide that way you are not left with alot of questions regarding the areas you left blank. Lol Good guide to a point but i think you should consider redoing it with a more detailed fashion or should I?

    1. To answer your questions/comments again :)

      Let me also add that if would also be nice to know if using these to run wow fully work. Like does quest work instances and raids?

      I never play on official server because it’s way too expensive for someone who’s living in a third world country and only makes a small amount of money monthly. So i don’t know whether this / that thing is working as it should or not, so you have to try it by yourself and see or ask at the mangos forum directly

      Suggestion from a programmer here. When doing a guide you should put all information and all details in the guide that way you are not left with alot of questions regarding the areas you left blank

      Back when i write this in 2010, i try to write it as accurate it can be, but time changes like for example; Scriptdev2 no longer use subversion for their version control and left the old version there and switched to GIT, so people that didn’t read the notice will be having problem (see step #1 at downloading mangos and scriptdev right before step #2), VS2005 is no longer supported and also VS2010 is the recommended way now which is not the case at the time i write this, etc.

      And there’ll be people that’s going to ask a question or two regardless of how you write the guide because it all depend on the technical knowledge of the one reading. To those that have experiences in this area, they don’t even need images and step by step walkthrough

      Lol Good guide to a point but i think you should consider redoing it with a more detailed fashion or should I?

      I’d be grateful if you want to rewrite this guide :-)

  10. This comment is due to many things. For example reading the compile guide you did mess up on how to do this. First off you do not type in cd /c to go to c directory you type in cd C: secondly if you want to make this as a update learn to give proper information such as updated coding. How out side of that I want to point out that these entire sources have many issues that should be addressed but I cant do that because I dont wish to and Because well its just a really old code. Visual C++ 2010 is out now and 2012 so really the coding is old and out dated to those that do program. I just want to point out that you did do a some what good job to this but you left out many many many important factors such as the program that is a shell for windows explorer does not work on all explorer browser versions. I also wanted to point out that the command you typed is invalid cd C/ not right.

    1. To answer your questions:

      This comment is due to many things. For example reading the compile guide you did mess up on how to do this. First off you do not type in cd /c to go to c directory you type in cd C:

      Just in case you didn’t notice that it is not a windows command prompt. It is msysgit bash shell which is totally different than windows cmd (command prompt) and MSYS is not the same as windows command prompt ( see http://www.mingw.org/faq/What_is_MSYS ). The root of drive c is mapped as /c try typing cd c: followed by pwd and see it for yourself although you don’t need to type pwd because it’s clearly displayed. If it were on windows command prompt i wouldn’t write that obviously, because it’s not going to work

      secondly if you want to make this as a update learn to give proper information such as updated coding. How out side of that I want to point out that these entire sources have many issues that should be addressed but I cant do that because I dont wish to and Because well its just a really old code. Visual C++ 2010 is out now and 2012 so really the coding is old and out dated to those that do program

      Actually Mangos support Visual Studio 2010 since a long time ago (at the time i write this it’s still not supported yet although the project file exist), but i believe i don’t need to rewrite all this stuff and replace all the images if people can simply ask what they don’t understand via comment.

      For those that have experiences or know what they’re doing, if they browse the win directory in mangos source they can see that there’s mangosdVC100.sln which is for VS 2010 that can be recognized easily from its filename but i’m sure you knew that because you said that you’re a programmer

      Anyway, i just updated the post to add a note to suggest people to use Visual Studio 2010 instead at the requirement

      I just want to point out that you did do a some what good job to this but you left out many many many important factors such as the program that is a shell for windows explorer does not work on all explorer browser versions. I also wanted to point out that the command you typed is invalid cd C/ not right.

      Back when i write this i tested it on both Windows XP and Vista (both x86) because i haven’t switched to 7 back then and they works fine without problem (i’m sure it’ll works just fine even on 7) so i’m not sure which explorer you’re referring to but obviously i won’t test it on every windows version out there. If you’re talking about Internet Explorer browsers, i’m testing this on IE8 on both XP and Vista back when i write this guide

      As for the many important factors i left out, could you please list them all? so i can write a much better post in the future :-)

  11. 1>..\base\follower_ai.cpp(291) : error C2039: ‘GetGUID’ : is not a member of ‘Player’
    1> c:\mangos-git\src\game\Player.h(1008) : see declaration of ‘Player’
    1>..\base\follower_ai.cpp(316) : error C2664: ‘Map::GetPlayer’ : cannot convert parameter 1 from ‘uint64’ to ‘ObjectGuid’
    1> Constructor for class ‘ObjectGuid’ is declared ‘explicit’
    1>..\base\follower_ai.cpp(331) : error C2039: ‘GetGUID’ : is not a member of ‘Player’
    1> c:\mangos-git\src\game\Player.h(1008) : see declaration of ‘Player’
    1>c:\mangos-git\src\bindings\scriptdev2\base\escort_ai.h(82) : error C2664: ‘Map::GetPlayer’ : cannot convert parameter 1 from ‘uint64’ to ‘ObjectGuid’
    1> Constructor for class ‘ObjectGuid’ is declared ‘explicit’
    1>..\base\escort_ai.cpp(344) : error C2039: ‘HasSplineFlag’ : is not a member of ‘Creature’
    1> c:\mangos-git\src\game\Creature.h(455) : see declaration of ‘Creature’
    1>..\base\escort_ai.cpp(345) : error C2039: ‘RemoveSplineFlag’ : is not a member of ‘Creature’
    1> c:\mangos-git\src\game\Creature.h(455) : see declaration of ‘Creature’
    1>..\base\escort_ai.cpp(346) : error C2039: ‘HasSplineFlag’ : is not a member of ‘Creature’
    1> c:\mangos-git\src\game\Creature.h(455) : see declaration of ‘Creature’
    1>..\base\escort_ai.cpp(347) : error C2039: ‘AddSplineFlag’ : is not a member of ‘Creature’
    1> c:\mangos-git\src\game\Creature.h(455) : see declaration of ‘Creature’
    1>..\base\escort_ai.cpp(435) : error C2039: ‘RemoveSplineFlag’ : is not a member of ‘Creature’
    1> c:\mangos-git\src\game\Creature.h(455) : see declaration of ‘Creature’
    1>..\base\escort_ai.cpp(442) : error C2039: ‘AddSplineFlag’ : is not a member of ‘Creature’
    1> c:\mangos-git\src\game\Creature.h(455) : see declaration of ‘Creature’
    1>..\base\escort_ai.cpp(503) : error C2039: ‘RemoveSplineFlag’ : is not a member of ‘Creature’
    1> c:\mangos-git\src\game\Creature.h(455) : see declaration of ‘Creature’
    1>Build log was saved at “file://c:\mangos-git\src\bindings\scriptdev2\VC90\ScriptDev2__Win32_Release\BuildLog.htm”
    1>ScriptDev2 – 2333 error(s), 0 warning(s)
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

    1. Could you describe in more detail about the problem? the way i see it from your build error log. You’re trying to compile the old scriptdev2 source which is no longer supported and obviously won’t compile with the recent mangos source

      Perhaps you missed the notice i put on the Downloading Mangos and Scriptdev2 source about scriptdev2 switching to GIT :)

  12. Can I clone git from my download files?I have download zip file from mangos and git clone git://github.com/mangos/mangos.git mangos-git always show fetal error

    1. I’m so sorry for an extremely late reply because i don’t know there’s a new comment posted here

      And to answer your question (and perhaps anyone else with the same question), the answer is Yes :)

      You just need to open mangosdVC100.sln if you have VS2010

  13. I managed to compile mangos no problem, but scriptdev2 is giving me problems. I’ve got the latest version, but when I go to compile, I get thousands of errors (2318, in fact)

    Any advice?

    1>guard_ai.cpp
    1>d:\mangos-git\src\bindings\scriptdev2\base\escort_ai.h(82) : error C2664: ‘Map::GetPlayer’ : cannot convert parameter 1 from ‘uint64’ to ‘ObjectGuid’
    1> Constructor for class ‘ObjectGuid’ is declared ‘explicit’
    1>..\scripts\eastern_kingdoms\arathi_highlands.cpp(107) : error C2039: ‘GetGUID’ : is not a member of ‘Player’
    1> d:\mangos-git\src\game\Player.h(1038) : see declaration of ‘Player’
    1>follower_ai.cpp
    1>escort_ai.cpp
    1>..\base\follower_ai.cpp(291) : error C2039: ‘GetGUID’ : is not a member of ‘Player’
    1> d:\mangos-git\src\game\Player.h(1038) : see declaration of ‘Player’
    1>..\base\follower_ai.cpp(316) : error C2664: ‘Map::GetPlayer’ : cannot convert parameter 1 from ‘uint64’ to ‘ObjectGuid’
    1> Constructor for class ‘ObjectGuid’ is declared ‘explicit’
    1>..\base\follower_ai.cpp(331) : error C2039: ‘GetGUID’ : is not a member of ‘Player’
    1> d:\mangos-git\src\game\Player.h(1038) : see declaration of ‘Player’
    1>d:\mangos-git\src\bindings\scriptdev2\base\escort_ai.h(82) : error C2664: ‘Map::GetPlayer’ : cannot convert parameter 1 from ‘uint64’ to ‘ObjectGuid’
    1> Constructor for class ‘ObjectGuid’ is declared ‘explicit’
    1>..\base\escort_ai.cpp(344) : error C2039: ‘HasSplineFlag’ : is not a member of ‘Creature’
    1> d:\mangos-git\src\game\Creature.h(440) : see declaration of ‘Creature’
    1>..\base\escort_ai.cpp(345) : error C2039: ‘RemoveSplineFlag’ : is not a member of ‘Creature’
    1> d:\mangos-git\src\game\Creature.h(440) : see declaration of ‘Creature’
    1>..\base\escort_ai.cpp(346) : error C2039: ‘HasSplineFlag’ : is not a member of ‘Creature’
    1> d:\mangos-git\src\game\Creature.h(440) : see declaration of ‘Creature’
    1>..\base\escort_ai.cpp(347) : error C2039: ‘AddSplineFlag’ : is not a member of ‘Creature’
    1> d:\mangos-git\src\game\Creature.h(440) : see declaration of ‘Creature’
    1>..\base\escort_ai.cpp(435) : error C2039: ‘RemoveSplineFlag’ : is not a member of ‘Creature’
    1> d:\mangos-git\src\game\Creature.h(440) : see declaration of ‘Creature’
    1>..\base\escort_ai.cpp(442) : error C2039: ‘AddSplineFlag’ : is not a member of ‘Creature’
    1> d:\mangos-git\src\game\Creature.h(440) : see declaration of ‘Creature’
    1>..\base\escort_ai.cpp(503) : error C2039: ‘RemoveSplineFlag’ : is not a member of ‘Creature’
    1> d:\mangos-git\src\game\Creature.h(440) : see declaration of ‘Creature’
    1>Build log was saved at “file://d:\mangos-git\src\bindings\scriptdev2\VC90\ScriptDev2__Win32_Release\BuildLog.htm”
    1>ScriptDev2 – 2318 error(s), 0 warning(s)
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

    1. Nevermind, followed Snarf666’s directions and it worked beautifully.

      Thanks to both of you!

    1. http://www.scriptdev2.com/showthread.php?t=4

      You have to register to see how to properly compile scriptdev2

      but all in all its checking it out to the bindings folder by using git:

      Right click the folder named bindings and select Git bash here from the context menu.
      – – Type in: “git clone git://github.com/scriptdev2/scriptdev2.git ScriptDev2” (or do the corresponding in your desired GUI)

    2. Thank you very much for the info although i’m replying really late because i don’t know there’s a comment posted here until i checked my email today and someone told me about ScriptDev2 has been moved to GIT

      Just in case someone else are looking an answer for this too:

      Suppose scriptdev2 is only moving to GIT and there are no other changes, then you can use the same method to fetch mangos but this time you write the Scriptdev2 GIT url instead of Mangos GIT url :)

  14. hey reaper, having problems compiling scriptdev2, erro c2666?

    boss_illidan.cpp
    ..\scripts\outland\black_temple\boss_illidan.cpp(619) : error C2666: ‘ObjectGuid::operator ==’ : 2 overloads have similar conversions
    c:\mangos-git\src\game\ObjectGuid.h(168): could be ‘bool ObjectGuid::operator ==(const ObjectGuid &) const’
    or ‘built-in C++ operator==(uint64, uint64)’
    while trying to match the argument list ‘(const ObjectGuid, const uint64)’

  15. Hello,
    I am stuck at :
    “1. Open mangosdVC90.sln inside win directory in mangos-git directory”
    There is no win directory,and i dont have a mangos-git directory,its named msysgit,i dont know what i did wrong.

  16. When I try to compile the scriptvc90.sln file this is the error I recieve. I didn’t recieve the error when compiling the Mangosdv90.sln file. Does anyone have any thoughts as to why it is happening?

    1>—— Rebuild All started: Project: ScriptDev2, Configuration: Debug Win32 ——
    1>Deleting intermediate and output files for project ‘ScriptDev2’, configuration ‘Debug|Win32’
    1>Extracting revision
    1>The system cannot find the path specified.
    1>Project : error PRJ0019: A tool returned an error code from “Extracting revision”
    1>Build log was saved at “file://c:\scriptdev2\VC90\ScriptDev2__Win32_Debug\BuildLog.htm”
    1>ScriptDev2 – 1 error(s), 0 warning(s)
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

  17. Hey Reaper. Appreciate the guide. When I was compiling the mangos in C++ ’08. It successfully finished 11 w/o any failed or skipped. I was comparing it to your picture and I appear to missing the “Scripts” and “Sockets” projects. Is this going to present any problems?