Damien LEFEVRE

How to compile hoedown on Windows

Clone the repository

git clone https://github.com/hoedown/hoedown.git

Create a build.bat file in the hoedown directory with 

set "VSCMD_START_DIR=%CD%"
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat"
nmake -f Makefile.win
xcopy /y /e "hoedown.dll" "hoedown\bin\"
xcopy /y /e "hoedown.def" "hoedown\lib\"
xcopy /y /e "hoedown.lib" "hoedown\lib\"
xcopy /y /e "src\*.h" "hoedown\include\"

 

How to compile Google V8 JavaScript engine on Windows

Motivation

I want to build v8 as shared library on Windows, later on Linux.

Pre-requisites

Depo tools installation

  • Download https://storage.googleapis.com/chrome-infra/depot_tools.zip
  • Extract in C:\devel\depot_tools
  • Create DEPO_TOOLS environment variable and set it to C:\devel\depot_tools
  • Instructions suggest adding DEPO_TOOLS as first entry in PATH. I don't do that since I need python3.6 on daily basis and depo_tools ships with Python 2.7 which becomes first in PATH
  • Perform the following commands
cd C:\devel\depot_tools
gclient
git config --global user.name "Your name"
git config --global user.email "your email address"
git config --global core.autocrlf false
git config --global core.filemode false
git config --global color.ui true

My build.bat script

set "VSCMD_START_DIR=%CD%"
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat"
set PATH=%DEPO_TOOLS%;%PATH%
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
set GYP_MSVS_VERSION=2017
call fetch v8
cd v8
call gclient sync
call gn gen out.gn/library --args="is_debug=false is_component_build=true v8_enable_i18n_support=false"
call ninja -C out.gn/library v8.dll
xcopy /y "include\*.h" "out.gn\v8_vc14_x64\include\"
xcopy /y "include\libplatform\*.h" "out.gn\v8_vc14_x64\include\libplatform\"
xcopy /y "out.gn\library\v8*.lib" "out.gn\v8_vc14_x64\lib\"
xcopy /y "out.gn\library\v8*.dll" "out.gn\v8_vc14_x64\bin\"
xcopy /y "out.gn\library\*.bin" "out.gn\v8_vc14_x64\bin\"

The end result is in ...\v8\out.gn\v8_vc14_x64

This Qt version is not compatible to your current Visual Studio (Qt builds VS version:0, current version: 1600)

I got this error message when trying to add in the VS Qt add-in a Qt folder compiled with Intel Composer 2013.

 

This is due to a bug in the add-in version 1.1.9 (QTVSADDINBUG-87) and had to upgrade to 1.1.11 which I know will give me other issues (QTVSADDINBUG-125).

 

Upgrading to 1.1.11 fix this problem. I'm just hoping that the version 1.2.x will not only be released for Qt 5.x.

Compiling Qt with Intel Composer

Pre-requisites

Make sure to have perl installed and accessible from PATH. I use strawberryperl.

 

By default the Intel Compiler build treats WChar_t As Built in Type (/Zc:wchar_t). The issues here is that the projects are created with this option turned OFF (/Zc:wchar_t-) and so is the VS2010 vanilla distribution. With the worry of being able to switch back and forth, I attempted to compile Qt ICC with the option turned OFF. I found a qmake.conf file, according to my path here C:\Qt\4.8.2-icc\mkspecs\win32-icc\qmake.conf. I modified the QMAKE_CXXFLAGS line like this: 

  • QMAKE_CXXFLAGS= $$QMAKE_CFLAGS /Zc:forScope /Zc:wchar_t-

 

Batch build

To make live easier I came up with a small batch file to do the builds. My folder structure is so:

  • C:\Qt
    • C:\Qt\4.8.2-icc
    • C:\Qt\4.8.2-icc-x64
    • C:\Qt\jom (download)

Inside 4.8.2-icc I copy build_qt_icc.bat which contains:

configure -nomake examples -nomake demos -opensource -platform win32-icc

..\jom\jom.exe

..\jom\jom.exe clean

 

Finally, I open the Intel Composer command prompt and run the batch file. Ex for 32-bit compilation:

...\>cd C:\Qt\4.8.2-icc

...\>build_qt_icc.bat

 

Note

I have tried to run both 32 and 64 batch builds simultaneously and they always fail. Building them on after another is fine.


 

 

View Damien Lefevre's profile on LinkedIn