我已经在netbeans中配置了cairo库和mingw,如下所示 这是我的代码
#include <stdio.h>
#include <stdlib.h>
#include <cairo.h>
int main(int argc, char** argv)
{
printf("Hola mundo");
cairo_surface_t *surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 240, 80);
cairo_t *cr = cairo_create (surface);
cairo_select_font_face (cr, "serif", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 32.0);
cairo_set_source_rgb (cr, 0.0, 0.0, 1.0);
cairo_move_to (cr, 10.0, 50.0);
cairo_show_text (cr, "Hello, world");
cairo_destroy (cr);
cairo_surface_write_to_png (surface, "hello.png");
cairo_surface_destroy (surface);
return (EXIT_SUCCESS);
}
所以当我尝试构建时,我收到以下错误:
undefined reference to cairo_image_surface_create
undefined reference to cairo_create
undefined reference to cairo_select_font_face
undefined reference to cairo_set_font_size
undefined reference to cairo_set_source_rgb
undefined reference to cairo_move_to
undefined reference to cairo_show_text
undefined reference to cairo_destroy
undefined reference to cairo_surface_write_to_png
undefined reference to cairo_surface_destroy
我如何配置netbeans以构建正常的?