我正在尝试在项目中使用gumbo-d,但是配音失败了。
这是配音输出:
Building: myproject (Default)
Performing main compilation...
dub build "myproject" "--build=plain"
Building package myproject in C:\Users\Matt\Documents\Projects\myproject\
Target vibe-d 0.7.23 is up to date. Use --force to rebuild.
Target gumbo-d 0.2.2 is up to date. Use --force to rebuild.
Building myproject ~master configuration "application", build type plain.
Compiling using dmd...
Linking...
OPTLINK (R) for Win32 Release 8.00.15
Copyright (C) Digital Mars 1989-2013 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
..\..\..\AppData\Roaming\dub\packages\gumbo-d-0.2.2\gumbo-d.lib(parse)
Error 42: Symbol Undefined _gumbo_destroy_output
..\..\..\AppData\Roaming\dub\packages\gumbo-d-0.2.2\gumbo-d.lib(parse)
Error 42: Symbol Undefined _gumbo_parse
--- errorlevel 2
FAIL .dub\build\application-plain-windows-x86-dmd_2066-946D41E793C045166B4DFD37035481AE\ myproject executable
Error executing command build: dmd failed with exit code 2.
Exit code 2
Build complete -- 1 error, 0 warnings
---------------------- Done ----------------------
Build: 1 error, 0 warnings
我有点不知道库文件需要去哪里以及它需要采用什么格式。gumbo-d 依赖目录中有一个 .lib 文件,这意味着是库吗?如果是这样,为什么链接器无法链接到它?
这是我的主要 dub.json 文件的内容(对于包含 gumbo-d 依赖项的整个项目)
{
"name": "googleplayscraper",
"description": "A simple vibe.d server application.",
"copyright": "Copyright © 2015, Matt",
"authors": ["Matt"],
"dependencies": {
"vibe-d": "~>0.7.19",
"gumbo-d": "~>0.2.2"
},
"versions": ["VibeDefaultMain"]
}
这是 gumbo-d 依赖项的 dub.json 文件:
{
"libs-posix": [
"gumbo"
],
"version": "0.2.2",
"description": "D bindings for Google's Gumbo HTML5 parser library",
"authors": [
"Christopher Bertels"
],
"importPaths": [
"source/"
],
"configurations": [
{
"targetType": "library",
"name": "library"
}
],
"homepage": "https://github.com/bakkdoor/gumbo-d",
"sourcePaths": [
"source/"
],
"name": "gumbo-d",
"copyright": "Copyright © 2013, Christopher Bertels"
}