Build Executable using PackageCompiler

I am trying to build an executable of hello.jl script following the guidance given in PackageCompiler help on this page https://github.com/JuliaLang/PackageCompiler.jl. I have tried both the options but the process fails. When using julia api, I get the following error.

julia> build_executable("C:\\Users\\Himanshi\\.julia\\packages\\PackageCompiler\\CJQcs\\examples\\hello.jl", "hello")
Julia program file:
  "C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\examples\hello.jl"
C program file:
  "C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\examples\program.c"
Build directory:
  "C:\Users\Himanshi\Desktop\Julia\builddir"
ERROR: LoadError: ArgumentError: Package REPL not found in current path:
- Run `import Pkg; Pkg.add("REPL")` to install the REPL package.

Stacktrace:
 [1] require(::Module, ::Symbol) at .\loading.jl:823
 [2] include at .\boot.jl:326 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1038
 [4] include at .\sysimg.jl:29 [inlined]
 [5] include_ifexists at .\client.jl:191 [inlined]
 [6] load_julia_startup() at .\client.jl:299
 [7] exec_options(::Base.JLOptions) at .\client.jl:238
 [8] _start() at .\client.jl:436
in expression starting at C:\Users\Himanshi\.julia\config\startup.jl:1
ERROR: failed process: Process(`'C:\Users\Himanshi\AppData\Local\Julia-1.1.1\bin\julia.exe' --output-o=hello.a --track-allocation=none --code-coverage=none --history-file=yes --inline=yes --math-mode=ieee --compile=yes --track-allocation=none --sysimage-native-code=yes '--sysimage=C:\Users\Himanshi\AppData\Local\Julia-1.1.1\lib\julia\sys.dll' --compiled-modules=yes --optimize=2 'C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\sysimg\run_julia_code.jl'`, ProcessExited(1)) [1]
Stacktrace:
 [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at .\error.jl:42
 [2] pipeline_error at .\process.jl:785 [inlined]
 [3] #run#515(::Bool, ::Function, ::Cmd) at .\process.jl:726
 [4] run at .\process.jl:724 [inlined]
 [5] #run_julia#1 at C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\src\compiler_flags.jl:225 [inlined]
 [6] #run_julia at .\none:0 [inlined]
 [7] (::getfield(PackageCompiler, Symbol("##13#14")){Base.Iterators.Pairs{Symbol,Nothing,NTuple{14,Symbol},NamedTuple{(:sysimage, :startup_file, :handle_signals, :sysimage_native_code, :compiled_modules, :depwarn, :warn_overwrite, :compile, :cpu_target, :optimize, :debug_level, :inline, :check_bounds, :math_mode),NTuple{14,Nothing}}},String})() at C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\src\static_julia.jl:263
 [8] cd(::getfield(PackageCompiler, Symbol("##13#14")){Base.Iterators.Pairs{Symbol,Nothing,NTuple{14,Symbol},NamedTuple{(:sysimage, :startup_file, :handle_signals, :sysimage_native_code, :compiled_modules, :depwarn, :warn_overwrite, :compile, :cpu_target, :optimize, :debug_level, :inline, :check_bounds, :math_mode),NTuple{14,Nothing}}},String}, ::String) at .\file.jl:85
 [9] #build_object#12(::Base.Iterators.Pairs{Symbol,Nothing,NTuple{14,Symbol},NamedTuple{(:sysimage, :startup_file, :handle_signals, :sysimage_native_code, :compiled_modules, :depwarn, :warn_overwrite, :compile, :cpu_target, :optimize, :debug_level, :inline, :check_bounds, :math_mode),NTuple{14,Nothing}}}, ::Function, ::String, ::String, ::String, ::Bool) at C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\src\static_julia.jl:262
 [10] #build_object at .\none:0 [inlined]
 [11] build_object(::String, ::String, ::String, ::Bool, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing) at C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\src\static_julia.jl:241
 [12] #static_julia#5(::Nothing, ::Bool, ::Bool, ::Nothing, ::String, ::Nothing, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Nothing, ::Bool, ::Bool, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::typeof(static_julia), ::String) at C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\src\static_julia.jl:162
 [13] #static_julia at .\none:0 [inlined]
 [14] #build_executable#31 at C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\src\api.jl:104 [inlined]
 [15] build_executable at C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\src\api.jl:104 [inlined] (repeats 2 times)
 [16] top-level scope at none:0

The error says Package REPL is not installed. Even if I install it, the same error get thorwn.
I also tried the Windows commnad line option and I get the following error. While the instructions say the command should be juliac.jl -ve examples\hello.jl but the same leads to opening the file rather than executing the command. I therefore added ‘julia’ before the command.

C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs>julia juliac.jl -ve examples\hello.jl
Julia program file:
  "C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\examples\hello.jl"
C program file:
  "C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\examples\program.c"
Build directory:
  "C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\builddir"
Make build directory
Build executable "hello.exe":
  `'C:\Users\Himanshi\.julia\packages\WinRPM\Y9QdZ\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\gcc.exe' --sysroot 'C:\Users\Himanshi\.julia\packages\WinRPM\Y9QdZ\deps\usr\x86_64-w64-mingw32\sys-root' '-DJULIAC_PROGRAM_LIBNAME="hello.dll"' -o hello.exe 'C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\examples\program.c' hello.dll -std=gnu99 '-IC:\Users\Himanshi\AppData\Local\Julia-1.1.1\include\julia' -DJULIA_ENABLE_THREADING=1 '-LC:\Users\Himanshi\AppData\Local\Julia-1.1.1\bin' -Wl,--stack,8388608 -ljulia -lopenlibm -m64`
gcc.exe: error: hello.dll: No such file or directory
ERROR: LoadError: failed process: Process(setenv(`'C:\Users\Himanshi\.julia\packages\WinRPM\Y9QdZ\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\gcc.exe' --sysroot 'C:\Users\Himanshi\.julia\packages\WinRPM\Y9QdZ\deps\usr\x86_64-w64-mingw32\sys-root' '-DJULIAC_PROGRAM_LIBNAME="hello.dll"' -o hello.exe 'C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\examples\program.c' hello.dll -std=gnu99 '-IC:\Users\Himanshi\AppData\Local\Julia-1.1.1\include\julia' -DJULIA_ENABLE_THREADING=1 '-LC:\Users\Himanshi\AppData\Local\Julia-1.1.1\bin' -Wl,--stack,8388608 -ljulia -lopenlibm -m64`,["PATH=C:\\Users\\Himanshi\\.julia\\packages\\WinRPM\\Y9QdZ\\deps\\usr\\x86_64-w64-mingw32\\sys-root\\mingw\\bin;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\iCLS\\;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\iCLS\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;c:\\users\\himanshi\\appdata\\local\\programs\\python\\python37\\Scripts;C:\\Users\\Himanshi\\AppData\\Local\\Julia-1.1.1\\bin;C:\\Users\\Himanshi\\.julia\\packages\\MKL\\36eeJ\\deps\\usr\\bin;C:\\Program Files\\nodejs\\;C:\\Users\\Himanshi\\Desktop\\Julia\\Nim\\nim-1.0.0\\bin;C:\\Users\\Himanshi\\Desktop\\Julia\\Nim\\ccompiler\\mingw64\\bin;C:\\Users\\Himanshi\\AppData\\Local\\Programs\\Python\\Python37\\Scripts\\;C:\\Users\\Himanshi\\AppData\\Local\\Programs\\Python\\Python37\\;C:\\Users\\Himanshi\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Himanshi\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Himanshi\\AppData\\Local\\atom\\bin;C:\\Users\\Himanshi\\AppData\\Roaming\\npm;;C:\\Users\\Himanshi\\Desktop\\Julia\\Nim\\nim-1.0.0\\bin;C:\\Users\\Himanshi\\.nimble\\bin"]), ProcessExited(1)) [1]
Stacktrace:
 [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at .\error.jl:42
 [2] pipeline_error at .\process.jl:785 [inlined]
 [3] #run#515(::Bool, ::Function, ::Cmd) at .\process.jl:726
 [4] run at .\process.jl:724 [inlined]
 [5] run_PATH(::Cmd) at C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\src\static_julia.jl:23
 [6] (::getfield(PackageCompiler, Symbol("##19#20")))() at C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\src\static_julia.jl:328
 [7] cd(::getfield(PackageCompiler, Symbol("##19#20")), ::String) at .\file.jl:85
 [8] build_exec(::String, ::String, ::String, ::String, ::Bool, ::Nothing, ::Nothing, ::Cmd, ::Array{String,1}) at C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\src\static_julia.jl:327
 [9] #static_julia#5(::Nothing, ::Bool, ::Bool, ::Nothing, ::Nothing, ::Nothing, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Nothing, ::Bool, ::Bool, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Array{String,1}, ::typeof(static_julia), ::String) at C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\src\static_julia.jl:171
 [10] (::getfield(PackageCompiler, Symbol("#kw##static_julia")))(::NamedTuple{(:verbose, :executable, :cc_flags),Tuple{Bool,Bool,Array{String,1}}}, ::typeof(static_julia), ::String) at .\none:0
 [11] julia_main(::Array{String,1}) at C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\juliac.jl:180
 [12] top-level scope at C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\juliac.jl:186
 [13] include at .\boot.jl:326 [inlined]
 [14] include_relative(::Module, ::String) at .\loading.jl:1038
 [15] include(::Module, ::String) at .\sysimg.jl:29
 [16] exec_options(::Base.JLOptions) at .\client.jl:267
 [17] _start() at .\client.jl:436
in expression starting at C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\juliac.jl:185

I also tried to compile another script containing some functions but could not succeed. Cannot understand the reason for the error.