glfw-rs
                                
                                 glfw-rs copied to clipboard
                                
                                    glfw-rs copied to clipboard
                            
                            
                            
                        Failed to run custom build command for glfw-sys on Windows
I'm aware a similar issue has been reported but it was of no help to me.
I'm trying to compile nanocg-rs examples which include glfw as a dependency like this:
[dependencies.glfw]
git = "https://github.com/bjz/glfw-rs"
However it fails to compile with this error:
C:\Users\David\Documents\NanoVGDemo\nanovg-rs\examples\demo>cargo build --verbose
   Compiling glfw-sys v3.1.2
     Running `C:\Users\David\Documents\NanoVGDemo\nanovg-rs\examples\demo\target\debug\build\glfw-sys-3ed703a32fdd86ee\build-script-build`
   Compiling png-sys v1.6.16 (https://github.com/servo/rust-png#3c310567)
     Running `C:\Users\David\Documents\NanoVGDemo\nanovg-rs\examples\demo\target\debug\build\png-sys-c0fc68e5ccc34308\build-script-build`
       Fresh semver v0.1.19
       Fresh libc v0.1.8
       Fresh khronos_api v0.0.7 (https://github.com/bjz/gl-rs#04713288)
   Compiling nanovg v0.2.0 (file:///C:/Users/David/Documents/NanoVGDemo/nanovg-rs/examples/demo)
     Running `C:\Users\David\Documents\NanoVGDemo\nanovg-rs\examples\demo\target\debug\build\nanovg-4dc7c6532c815c9b\build-script-build`
       Fresh gcc v0.3.8
       Fresh bitflags v0.3.2
       Fresh bitflags v0.2.1
       Fresh log v0.3.1
       Fresh gl_common v0.0.4 (https://github.com/bjz/gl-rs#04713288)
       Fresh xml-rs v0.1.25
       Fresh gl_generator v0.0.27 (https://github.com/bjz/gl-rs#04713288)
Build failed, waiting for other jobs to finish...
failed to run custom build command for `glfw-sys v3.1.2`
Process didn't exit successfully: `C:\Users\David\Documents\NanoVGDemo\nanovg-rs\examples\demo\target\debug\build\glfw-sys-3ed703a32fdd86ee\build-script-build` (exit code: 101
)
--- stderr
thread '<main>' panicked at 'Failed to build with cmake', ../src/libcore\option.rs:330
I have downloaded glfw (libraries and source) and have them installed in a folder on the c drive. The path is included in my system PATH as well.
Thanks
I tried this with default-features = false in the toml file. But I got this error when compiling:
C:\Users\David\Documents\NanoVGDemo\nanovg-rs\examples\demo>cargo build
   Compiling png-sys v1.6.16 (https://github.com/servo/rust-png#3c310567)
   Compiling nanovg v0.2.0 (file:///C:/Users/David/Documents/NanoVGDemo/nanovg-r
s/examples/demo)
Build failed, waiting for other jobs to finish...
failed to run custom build command for `nanovg v0.2.0 (file:///C:/Users/David/Do
cuments/NanoVGDemo/nanovg-rs/examples/demo)`
Process didn't exit successfully: `C:\Users\David\Documents\NanoVGDemo\nanovg-rs
\examples\demo\target\debug\build\nanovg-4dc7c6532c815c9b\build-script-build` (e
xit code: 101)
--- stdout
TARGET = Some("x86_64-pc-windows-gnu")
TARGET = Some("x86_64-pc-windows-gnu")
CARGO_MANIFEST_DIR = Some("C:\\Users\\David\\Documents\\NanoVGDemo\\nanovg-rs")
OUT_DIR = Some("C:\\Users\\David\\Documents\\NanoVGDemo\\nanovg-rs\\examples\\de
mo\\target\\debug\\build\\nanovg-4dc7c6532c815c9b\\out")
OPT_LEVEL = Some("0")
PROFILE = Some("debug")
debug 0
TARGET = Some("x86_64-pc-windows-gnu")
HOST = Some("x86_64-pc-windows-gnu")
CC_x86_64-pc-windows-gnu = None
CC_x86_64_pc_windows_gnu = None
HOST_CC = None
CC = None
TARGET = Some("x86_64-pc-windows-gnu")
HOST = Some("x86_64-pc-windows-gnu")
CFLAGS_x86_64-pc-windows-gnu = None
CFLAGS_x86_64_pc_windows_gnu = None
HOST_CFLAGS = None
CFLAGS = None
TARGET = Some("x86_64-pc-windows-gnu")
HOST = Some("x86_64-pc-windows-gnu")
CC_x86_64-pc-windows-gnu = None
CC_x86_64_pc_windows_gnu = None
HOST_CC = None
CC = None
running: "gcc" "-O0" "-c" "-ffunction-sections" "-fdata-sections" "-mwin32" "-m6
4" "-fPIC" "-I" "nanovg/src" "-I" "nanovg/example" "-DNANOVG_GL3_IMPLEMENTATION"
 "C:\Users\David\Documents\NanoVGDemo\nanovg-rs\nanovg/src/nanovg.c" "-o" "C:\Us
ers\David\Documents\NanoVGDemo\nanovg-rs\examples\demo\target\debug\build\nanovg
-4dc7c6532c815c9b\out\nanovg/src\nanovg.o"
OPT_LEVEL = Some("0")
PROFILE = Some("debug")
debug 0
TARGET = Some("x86_64-pc-windows-gnu")
HOST = Some("x86_64-pc-windows-gnu")
CC_x86_64-pc-windows-gnu = None
CC_x86_64_pc_windows_gnu = None
HOST_CC = None
CC = None
TARGET = Some("x86_64-pc-windows-gnu")
HOST = Some("x86_64-pc-windows-gnu")
CFLAGS_x86_64-pc-windows-gnu = None
CFLAGS_x86_64_pc_windows_gnu = None
HOST_CFLAGS = None
CFLAGS = None
TARGET = Some("x86_64-pc-windows-gnu")
HOST = Some("x86_64-pc-windows-gnu")
CC_x86_64-pc-windows-gnu = None
CC_x86_64_pc_windows_gnu = None
HOST_CC = None
CC = None
running: "gcc" "-O0" "-c" "-ffunction-sections" "-fdata-sections" "-mwin32" "-m6
4" "-fPIC" "-I" "nanovg/src" "-I" "nanovg/example" "-DNANOVG_GL3_IMPLEMENTATION"
 "C:\Users\David\Documents\NanoVGDemo\nanovg-rs\src/nanovg_shim.c" "-o" "C:\User
s\David\Documents\NanoVGDemo\nanovg-rs\examples\demo\target\debug\build\nanovg-4
dc7c6532c815c9b\out\src\nanovg_shim.o"
command did not execute successfully, got: exit code: 1
--- stderr
C:\Users\David\Documents\NanoVGDemo\nanovg-rs\nanovg/src/nanovg.c:1:0: warning:
-fPIC ignored for target (all code is position independent) [enabled by default]
C:\Users\David\Documents\NanoVGDemo\nanovg-rs\src/nanovg_shim.c:1:0: warning: -f
PIC ignored for target (all code is position independent) [enabled by default]
In file included from C:\Users\David\Documents\NanoVGDemo\nanovg-rs\src/nanovg_s
him.c:13:0:
nanovg/src/nanovg_gl.h: In function 'glnvg__createShader':
nanovg/src/nanovg_gl.h:406:24: error: 'GL_VERTEX_SHADER' undeclared (first use i
n this function)
nanovg/src/nanovg_gl.h:406:24: note: each undeclared identifier is reported only
 once for each function it appears in
nanovg/src/nanovg_gl.h:407:24: error: 'GL_FRAGMENT_SHADER' undeclared (first use
 in this function)
nanovg/src/nanovg_gl.h:414:22: error: 'GL_COMPILE_STATUS' undeclared (first use
in this function)
nanovg/src/nanovg_gl.h:434:23: error: 'GL_LINK_STATUS' undeclared (first use in
this function)
nanovg/src/nanovg_gl.h: In function 'glnvg__renderCreate':
nanovg/src/nanovg_gl.h:667:16: error: 'GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT' undec
lared (first use in this function)
nanovg/src/nanovg_gl.h: In function 'glnvg__renderCreateTexture':
nanovg/src/nanovg_gl.h:743:53: error: 'GL_CLAMP_TO_EDGE' undeclared (first use i
n this function)
nanovg/src/nanovg_gl.h: In function 'glnvg__setUniforms':
nanovg/src/nanovg_gl.h:921:20: error: 'GL_UNIFORM_BUFFER' undeclared (first use
in this function)
nanovg/src/nanovg_gl.h: In function 'glnvg__fill':
nanovg/src/nanovg_gl.h:958:50: error: 'GL_INCR_WRAP' undeclared (first use in th
is function)
nanovg/src/nanovg_gl.h:959:49: error: 'GL_DECR_WRAP' undeclared (first use in th
is function)
nanovg/src/nanovg_gl.h: In function 'glnvg__renderFlush':
nanovg/src/nanovg_gl.h:1088:19: error: 'GL_TEXTURE0' undeclared (first use in th
is function)
nanovg/src/nanovg_gl.h:1100:16: error: 'GL_UNIFORM_BUFFER' undeclared (first use
 in this function)
nanovg/src/nanovg_gl.h:1101:79: error: 'GL_STREAM_DRAW' undeclared (first use in
 this function)
nanovg/src/nanovg_gl.h:1108:16: error: 'GL_ARRAY_BUFFER' undeclared (first use i
n this function)
thread '<main>' panicked at 'explicit panic', C:\Users\David\.cargo\registry\src
\github.com-0a35038f75765ae4\gcc-0.3.8\src\lib.rs:497
nanovg/src/nanovg_gl.h:407:24: error: 'GL_FRAGMENT_SHADER' undeclared (first use in this function)
Sounds like an error in nanovg_gl not glfw-rs
wtf 2015 and no solution