Skip to content

Build on Windows using MSVC, nmake#7

Merged
josevalim merged 2 commits intodevinus:masterfrom
chyndman:win-nmake
Jun 18, 2014
Merged

Build on Windows using MSVC, nmake#7
josevalim merged 2 commits intodevinus:masterfrom
chyndman:win-nmake

Conversation

@chyndman
Copy link
Copy Markdown
Contributor

These commits allow for building on Windows. I based this on my ExDoc work and submitted a PR here per @josevalim's request. The same steps to build hold:

  1. Have Erlang and Elixir on system and in Path variable.
  2. Git clone devinus/markdown into your favorite folder.
  3. Install Visual Studio 2013 (Express should suffice, I'm using Ultimate).
  4. In a Command Prompt run "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" _ARCH_, where _ARCH_ is either x86 (if you installed 32-bit Erlang) or amd64 (64-bit Erlang).
  5. cd into the repo folder and run mix compile.

Requires elixir-lang/elixir #2426.

@josevalim
Copy link
Copy Markdown
Contributor

Thank you! Quick question: what does the "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" _ARCH_ command does?

@devinus
Copy link
Copy Markdown
Owner

devinus commented Jun 18, 2014

Probably injects ENV vars into your session.

@devinus
Copy link
Copy Markdown
Owner

devinus commented Jun 18, 2014

MSVC comes with a MSVC version of the console as a shortcut which I assume does this by default when run, but not everybody wants to run cmd.exe when on Windows.

@chyndman
Copy link
Copy Markdown
Contributor Author

@devinus Correct, it sets up environment variables. Calling it manually makes sure the architecture matches Erlang (the shortcut uses x86). Unfortunately variables only stay for the life of the cmd.exe shell which called the batch file.

josevalim pushed a commit that referenced this pull request Jun 18, 2014
Build on Windows using MSVC, nmake
@josevalim josevalim merged commit 0345e20 into devinus:master Jun 18, 2014
@josevalim
Copy link
Copy Markdown
Contributor

Thanks @devinus and @chyndman. Do you folks think we should add a note to the README telling developers on windows they need to have VS Express installed (with a link pointing to the install instructions) and a note with the command to run?

@chyndman chyndman deleted the win-nmake branch June 18, 2014 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants