我跟隨此post來構建和安裝cairo。無法解析的外部符號:__cairo_path_fixed_stroke_to_traps
不過,我被困與下面的錯誤:
Error 277 error LNK2019: unresolved external symbol __cairo_path_fixed_stroke_to_traps referenced in function __cairo_traps_compositor_stroke C:\gtk_compilation\cairo\cairo-1.12.18\msvc\vs10\cairo-traps-compositor.obj cairo
安裝指南說,我需要關閉,我沒有使用的/GL-
編譯器標誌整個程序優化 但仍然沒有辦法圍繞這個問題。
下面是從C:\gtk_compilation\cairo\cairo-1.12.18\msvc\vs10\cairo-traps-compositor.c
文件的摘錄:
cairo_int_status_t (*func) (const cairo_path_fixed_t *path,
const cairo_stroke_style_t *stroke_style,
const cairo_matrix_t *ctm,
const cairo_matrix_t *ctm_inverse,
double tolerance,
cairo_traps_t *traps);
composite_traps_info_t info;
unsigned flags;
if (antialias == CAIRO_ANTIALIAS_BEST || antialias == CAIRO_ANTIALIAS_GOOD) {
func = _cairo_path_fixed_stroke_polygon_to_traps;
flags = 0;
} else {
func = _cairo_path_fixed_stroke_to_traps; /* line#2183 */
flags = need_bounded_clip (extents) & ~NEED_CLIP_SURFACE;
}
上述功能在cairoint.h被定義爲:
cairo_private cairo_int_status_t
_cairo_path_fixed_stroke_to_traps (const cairo_path_fixed_t *path,
const cairo_stroke_style_t *stroke_style,
const cairo_matrix_t *ctm,
const cairo_matrix_t *ctm_inverse,
double tolerance,
cairo_traps_t *traps);
cairo_private cairo_int_status_t
_cairo_path_fixed_stroke_polygon_to_traps (const cairo_path_fixed_t *path,
const cairo_stroke_style_t *stroke_style,
const cairo_matrix_t *ctm,
const cairo_matrix_t *ctm_inverse,
double tolerance,
cairo_traps_t *traps);
有誰請提出解決類似的問題?
cairoint.h不是定義函數的地方;它是宣佈的地方。該函數在cairo-path-stroke-traps.c中定義。該文件正在編譯?它是否被鏈接? – andlabs
謝謝你,我只是發現這個特定的文件不在項目源文件中。天哪,爲什麼我沒有檢查過這個? – sjsam