2016-09-20 11 views
0

Windows 10(64ビット)のカバール経由でhackageからffmpeg-lightライブラリをインストールします。だから私はffmpegをダウンロードし、それをC:\ FFmpegに解凍した。カバール付きffmpeg-lightをインストールする

最初に、pkg-configはさまざまなパッケージを見つけることができなかったと訴えていました。私はこの問題を.pcファイルで解決しました。

私はコマンドを使用しようとしました:cabal install ffmpeg-light Cabalは、Cライブラリを見つけられず、.pcファイルを作成したものです。

次に、私はコマンド:cabal install ffmpeg-light --extra-lib-dirs=C:\FFmpeg\libを試しました。今、私が言う別のエラーメッセージを、持っている:

Enums.hsc:7:32: fatal error: libavcodec/avcodec.h: No such file or directory 

編集:

cabal install ffmpeg-light --extra-lib-dirs=C:\FFmpeg\lib \ 
          --extra-include-dirs=C:\FFmpeg\include 

今すぐ最初のコンパイラはffmpegの中に廃止予定の機能に関するいくつかの警告を与える:
は、その後、私は、次のコマンドを試してみましたffmpeg-lightで余分なインポートが行われますが、11のうち11がコンパイルされます。しかし、ビルドはまだ成功していません。

In-place registering ffmpeg-light-0.11.1... 
setup-Simple-Cabal-1.22.5.0-x86_64-windows-ghc-7.10.3.exe: 
'C:\Haskell\bin\ghc-pkg.exe' exited with an error: 
ffmpeg-light-0.11.1: Warning: haddock-interfaces: 
C:\Users\HOLEYC~1\AppData\Local\Temp\cabal-tmp-2824\ffmpeg-light-0.11.1\dist\doc\html\ffmpeg-light\ffmpeg-light.haddock 
doesn't exist or isn't a file 
ffmpeg-light-0.11.1: Warning: haddock-html: 
C:\Users\HOLEYC~1\AppData\Local\Temp\cabal-tmp-2824\ffmpeg-light-0.11.1\dist\doc\html\ffmpeg-light 
doesn't exist or isn't a directory 
ffmpeg-light-0.11.1: library-dirs: C:FFmpeglib is a relative path which makes 
no sense (as there is nothing for it to be relative to). You can make paths 
relative to the package database itself by using ${pkgroot}. (use --force to 
override) 
ffmpeg-light-0.11.1: include-dirs: C:FFmpeginclude is a relative path which 
makes no sense (as there is nothing for it to be relative to). You can make 
paths relative to the package database itself by using ${pkgroot}. (use 
--force to override) 
cabal: Error: some packages failed to install: 
ffmpeg-light-0.11.1 failed during the building phase. The exception was: 
ExitFailure 1 

いくつかの追加情報:私はPKG-config設定に使用

cabal version: cabal-install version 1.22.6.0 
using version 1.22.5.0 of the Cabal library 
gcc version of my installed Haskell platform: 5.2.0 

例.PCファイル:

Name: libavcodec 
Description: Library for ffmpeg 
Version: 57 
Cflags: -IC:\FFmpeg\include 
Libs: -LC:\FFmpeg\lib -llibavcodec 
+0

ghcにヘッダファイルの場所を伝えるには '--extra-include-dirs'が必要です。 –

+0

@Thomas M. DuBuisson:ありがとうございました。私の質問を編集しました。 – WirflBirfl

+0

スラッシュをエスケープする必要があると思います。例: '--extra-include-dirs = C:\\ FFmpeg \\ include' –

答えて

0

OK。私はそれを考え出した。 --ghc-pkg-options = " - force"オプションが必要でした。

cabal install ffmpeg-light --extra-lib-dirs=C:\FFmpeg\lib --extra-include-dirs=C:\FFmpeg\include --ghc-pkg-options="--force"

関連する問題