我正在处理依赖于外部C库的库,并希望将头文件和lib文件捆绑到我的项目中。 stack.yaml
文件要求所有路径都是绝对的,这显然不是理想的目的。
根据@ adamse的请求,这是我的stack.yaml
:
flags: {}
extra-package-dbs: []
packages:
- '.'
extra-deps:
- ALUT-2.4.0.2
- OpenAL-1.7.0.4
resolver: lts-7.2
extra-lib-dirs:
- './dependencies/freealut/admin/VisualStudio6/alut/x64/Release'
- './dependencies/openal-soft-1.16.0-bin/openal-soft-1.16.0-bin/libs/Win64'
和错误消息:
Could not parse 'C:\Users\Jonatan\Desktop\Haskell\modules\AbbeyRoad\stack.yaml':
Aeson exception:
Error in $['extra-lib-dirs'][0]: failed to parse field 'extra-lib-dirs': InvalidAbsDir "./dependencies/freealut/admin/VisualStudio6/alut/x64/Release"
See http://docs.haskellstack.org/en/stable/yaml_configuration/
.cabal
:
extra-libraries: OpenAL32, alut
extra-lib-dirs: ./dependencies/freealut/admin/VisualStudio6/alut/x64/Release, ./dependencies/openal-soft-1.16.0-bin/openal-soft-1.16.0-bin/libs/Win64