我跟随此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