c++ - 无法解析的外部符号 : __cairo_path_fixed_stroke_to_traps

标签 c++ c visual-studio gtk cairo

我正在关注这个post构建并安装 cairo。

但是,我遇到了以下错误:

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);

有人可以建议解决此问题的方法吗?

最佳答案

根据 @andlabs 评论,我发现文件 cairo-path-行程-traps.c 未包含在 Visual Studio 项目源中。添加了这个并重建了解决方案 - 瞧!!

关于c++ - 无法解析的外部符号 : __cairo_path_fixed_stroke_to_traps,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33191396/

相关文章:

c++ - 访问嵌套类的成员

c# - 在 Windows 中使用命名管道 (C++/C#)

c++ - Eclipse 是否有任何增强的 gdb 控制台?

c - 分配了错误的内存

c - 是否可以访问 "recursive mode"中的指针?

c# - 解决方案中的两个项目使用不同的默认路径

c# - 将文本复制到剪贴板错误 CS1503 参数 2 : cannot convert from 'string' to 'System.Windows.Forms.TextDataFormat'

c++ - 为什么像虚幻引擎这样的大项目要自己写容器类?

尽管使用 Microsoft.Net.Compilers nuget 包,VS2013 上的 C#6 错误消息

MFC 中的 C++ GUI - 分页小部件