Yalir / sfeMovie

sfeMovie is a simple C++ library that lets you play movies in SFML based applications. It relies on FFmpeg to read medias and remains consistent with SFML's naming conventions.
http://sfemovie.yalir.org/
GNU Lesser General Public License v2.1
114 stars 37 forks source link

Build Error: /usr/bin/bash: line 0: cd: too many arguments #110

Closed Ming-2015 closed 5 years ago

Ming-2015 commented 5 years ago

I was following instructions on http://sfemovie.yalir.org/latest/start.php to create the binaries for sfeMovie. Was able to create the build with CMake-gui. Downloaded the Master branch of latest sfeMovie repository. Using SFML version 2.5.1, and did not enable ASS Subtitles.

After generating a solution for Visual Studio 15 2017 (I'm using the Community version) in CMake, I tried building the ALL_BUILD project. The build failed, however.

Here's the output in Visual Studio:

Build started: Project: FFmpeg, Configuration: Debug Win32 ------ 1>Generating ../FFmpeg-binaries/lib/avformat.lib, ../FFmpeg-binaries/lib/avdevice.lib, ../FFmpeg-binaries/lib/avcodec.lib, ../FFmpeg-binaries/lib/avutil.lib, ../FFmpeg-binaries/lib/swscale.lib, ../FFmpeg-binaries/lib/swresample.lib 1>/usr/bin/bash: line 0: cd: too many arguments 1>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe" exited with code 1. 1>Done building project "FFmpeg.vcxproj" -- FAILED. 2>------ Build started: Project: sfeMovie, Configuration: Debug Win32 ------ 2>AudioStream.cpp 2>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\src\AudioStream.cpp(371): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data 2>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\src\AudioStream.cpp(406): warning C4244: 'return': conversion from 'int64_t' to 'int', possible loss of data 2>Demuxer.cpp 2>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\src\Demuxer.cpp(664): warning C4244: 'initializing': conversion from 'float' to 'int64_t', possible loss of data 2>Log.cpp 2>Macros.cpp 2>Movie.cpp 2>MovieImpl.cpp 2>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\src\MovieImpl.cpp(344): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data 2>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\src\MovieImpl.cpp(343): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data 2>Stream.cpp 2>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\src\Stream.cpp(223): warning C4244: 'argument': conversion from 'int64_t' to 'int', possible loss of data 2>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\src\Stream.cpp(224): warning C4244: 'argument': conversion from 'double' to 'sf::Int32', possible loss of data 2>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\src\Stream.cpp(239): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data 2>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\src\Stream.cpp(243): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data 2>StreamSelection.cpp 2>SubtitleStream.cpp 2>Timer.cpp 2>TimerPriorities.cpp 2>Utilities.cpp 2>VideoStream.cpp 2>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\src\VideoStream.cpp(203): warning C4018: '>': signed/unsigned mismatch 2>Generating Code... 2>Error copying directory from "F:/Chrome Downloads/sfeMovie-master/sfeMovie-build/FFmpeg-binaries/bin" to "F:/Chrome Downloads/sfeMovie-master/sfeMovie-build/bin". 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "setlocal 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: "F:\Chrome Downloads\cmake-3.14.0-rc3-win32-x86\cmake-3.14.0-rc3-win32-x86\bin\cmake.exe" -E copy_directory "F:/Chrome Downloads/sfeMovie-master/sfeMovie-build/FFmpeg-binaries/lib" "F:/Chrome Downloads/sfeMovie-master/sfeMovie-build/bin" 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmEnd 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmErrorLevel 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: exit /b %1 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmDone 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: setlocal 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: "F:\Chrome Downloads\cmake-3.14.0-rc3-win32-x86\cmake-3.14.0-rc3-win32-x86\bin\cmake.exe" -E copy_directory "F:/Chrome Downloads/sfeMovie-master/sfeMovie-build/FFmpeg-binaries/bin" "F:/Chrome Downloads/sfeMovie-master/sfeMovie-build/bin" 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmEnd 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmErrorLevel 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: exit /b %1 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmDone 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd 2>F:\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 1. 2>Done building project "sfeMovie.vcxproj" -- FAILED. 3>------ Build started: Project: sfeMovieDemo, Configuration: Debug Win32 ------ 4>------ Build started: Project: sfeMovieMinimalistDemo, Configuration: Debug Win32 ------ 3>main.cpp 3>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\examples\Demo\main.cpp(102): warning C4244: 'argument': conversion from 'float' to 'unsigned int', possible loss of data 3>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\examples\Demo\main.cpp(151): warning C4244: 'argument': conversion from 'float' to 'unsigned int', possible loss of data 3>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\examples\Demo\main.cpp(192): warning C4244: 'argument': conversion from 'T' to 'float', possible loss of data 3> with 3> [ 3> T=unsigned int 3> ] 4>main.cpp 3>MediaInfo.cpp 4>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\examples\MinimalistDemo\main.cpp(80): warning C4244: 'argument': conversion from 'float' to 'unsigned int', possible loss of data 4>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\examples\MinimalistDemo\main.cpp(119): warning C4244: 'argument': conversion from 'T' to 'float', possible loss of data 4> with 4> [ 4> T=unsigned int 4> ] 3>StreamSelector.cpp 3>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\examples\Demo\StreamSelector.cpp(43): warning C4018: '<': signed/unsigned mismatch 3>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\examples\Demo\StreamSelector.cpp(47): warning C4018: '<': signed/unsigned mismatch 3>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\examples\Demo\StreamSelector.cpp(51): warning C4018: '<': signed/unsigned mismatch 4>LINK : fatal error LNK1104: cannot open file '....\bin\sfeMovie-d.lib' 4>Done building project "sfeMovieMinimalistDemo.vcxproj" -- FAILED. 3>UserInterface.cpp 3>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\examples\Demo\UserInterface.cpp(59): warning C4244: 'argument': conversion from 'T' to 'T', possible loss of data 3> with 3> [ 3> T=unsigned int 3> ] 3> and 3> [ 3> T=float 3> ] 3>F:\Chrome Downloads\sfeMovie-master\sfeMovie-master\examples\Demo\UserInterface.cpp(60): warning C4244: 'argument': conversion from 'T' to 'float', possible loss of data 3> with 3> [ 3> T=unsigned int 3> ] 3>Generating Code... 3>LINK : fatal error LNK1104: cannot open file '....\bin\sfeMovie-d.lib' 3>Done building project "sfeMovieDemo.vcxproj" -- FAILED. ========== Build: 0 succeeded, 4 failed, 2 up-to-date, 0 skipped ==========

ZERO_CHECK managed to build just fine, but everything else stopped working after the message: 1>/usr/bin/bash: line 0: cd: too many arguments

Please let me know if there's any fix for this problem.

Ming-2015 commented 5 years ago

Managed to find the issue. It was probably because the cd command is not used with double quotations, which makes any path with a space in between to become invalid. I re-generated the solution after moving it to C:\ and it's now working fine.