germangb / minimp3-rs

minimp3 rust bindings + wrapper
MIT License
65 stars 20 forks source link

Build failing on Windows #9

Closed reneklacan closed 5 years ago

reneklacan commented 5 years ago

This might not even be an issue with this crate as it's failing to compile C files but I wonder if I'm missing something. Looks like it's using an older compiler standard than it's supposed to be using.

Any tips on resolving this?

error: failed to run custom build command for `minimp3-sys v0.3.1`
process didn't exit successfully: `D:\Workspace\rust\honkio\target\release\build                                                  \minimp3-sys-873c9c49e757c783\build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-pc-windows-msvc")
OPT_LEVEL = Some("3")
HOST = Some("x86_64-pc-windows-msvc")
CC_x86_64-pc-windows-msvc = None
CC_x86_64_pc_windows_msvc = None
HOST_CC = None
CC = None
CFLAGS_x86_64-pc-windows-msvc = None
CFLAGS_x86_64_pc_windows_msvc = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,mmx,sse,sse2")
DEBUG = Some("false")
running: "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\x86_am                                                  d64\\cl.exe" "/nologo" "/MD" "/O2" "/I" "minimp3/" "/W4" "/DMINIMP3_IMPLEMENTATI                                                  ON" "/FoD:\\Workspace\\rust\\honkio\\target\\release\\build\\minimp3-sys-d02cfb8                                                  fbdd8ed8c\\out\\minimp3.o" "/c" "minimp3.c"
minimp3.c
minimp3/minimp3.h(409) : warning C4244: '=' : conversion from 'uint32_t' to 'uin                                                  t8_t', possible loss of data
minimp3/minimp3.h(579) : warning C4244: '=' : conversion from 'uint32_t' to 'uin                                                  t8_t', possible loss of data
minimp3/minimp3.h(617) : warning C4244: '=' : conversion from 'int' to 'uint8_t'                                                  , possible loss of data
minimp3/minimp3.h(618) : warning C4244: '=' : conversion from 'int' to 'uint8_t'                                                  , possible loss of data
minimp3/minimp3.h(935) : warning C4244: '=' : conversion from 'int' to 'uint8_t'                                                  , possible loss of data
minimp3/minimp3.h(1379) : error C2275: 'int16_t' : illegal use of this type as a                                                  n expression
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\stdint.h(                                                  9) : see declaration of 'int16_t'
minimp3/minimp3.h(1379) : error C2146: syntax error : missing ';' before identif                                                  ier 's'
minimp3/minimp3.h(1379) : error C2065: 's' : undeclared identifier
minimp3/minimp3.h(1380) : error C2065: 's' : undeclared identifier
minimp3/minimp3.h(1381) : error C2065: 's' : undeclared identifier
minimp3/minimp3.h(1381) : warning C4244: 'return' : conversion from 'int' to 'in                                                  t16_t', possible loss of data
minimp3/minimp3.h(1482) : warning C4244: '=' : conversion from 'int' to 'mp3d_sa                                                  mple_t', possible loss of data
minimp3/minimp3.h(1483) : warning C4244: '=' : conversion from 'int' to 'mp3d_sa                                                  mple_t', possible loss of data
minimp3/minimp3.h(1484) : warning C4244: '=' : conversion from 'int' to 'mp3d_sa                                                  mple_t', possible loss of data
minimp3/minimp3.h(1485) : warning C4244: '=' : conversion from 'int' to 'mp3d_sa                                                  mple_t', possible loss of data
minimp3/minimp3.h(1486) : warning C4244: '=' : conversion from 'int' to 'mp3d_sa                                                  mple_t', possible loss of data
minimp3/minimp3.h(1487) : warning C4244: '=' : conversion from 'int' to 'mp3d_sa                                                  mple_t', possible loss of data
minimp3/minimp3.h(1488) : warning C4244: '=' : conversion from 'int' to 'mp3d_sa                                                  mple_t', possible loss of data
minimp3/minimp3.h(1489) : warning C4244: '=' : conversion from 'int' to 'mp3d_sa                                                  mple_t', possible loss of data
exit code: 2

--- stderr
thread 'main' panicked at '

Internal error occurred: Command "C:\\Program Files (x86)\\Microsoft Visual Stud                                                  io 12.0\\VC\\bin\\x86_amd64\\cl.exe" "/nologo" "/MD" "/O2" "/I" "minimp3/" "/W4"                                                   "/DMINIMP3_IMPLEMENTATION" "/FoD:\\Workspace\\rust\\honkio\\target\\release\\bu                                                  ild\\minimp3-sys-d02cfb8fbdd8ed8c\\out\\minimp3.o" "/c" "minimp3.c" with args "c                                                  l.exe" did not execute successfully (status code exit code: 2).

', C:\Users\rk\.cargo\registry\src\github.com-1ecc6299db9ec823\cc-1.0.35\src\lib                                                  .rs:2398:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed
reneklacan commented 5 years ago

Downloading the latest Visual Studio IDE (https://visualstudio.microsoft.com/) fixed this issue for me.