如何链接lpng包

时间:2011-11-25 21:05:50

标签: visual-c++ boost linker-errors libpng boost-gil

我使用VC ++,boost :: gil包和lpng包来读取png图像。在调试之后我有了 以下链接问题:

Error   3   error LNK2001: unresolved external symbol _png_set_swap img_seq_interp.obj  img_seq_interp
Error   4   error LNK2001: unresolved external symbol _png_get_bit_depth    img_seq_interp.obj  img_seq_interp
Error   5   error LNK2001: unresolved external symbol _png_read_info    img_seq_interp.obj  img_seq_interp
Error   6   error LNK2001: unresolved external symbol _png_set_sig_bytes    img_seq_interp.obj  img_seq_interp
Error   7   error LNK2001: unresolved external symbol _png_init_io  img_seq_interp.obj  img_seq_interp
Error   8   error LNK2001: unresolved external symbol _png_set_longjmp_fn   img_seq_interp.obj  img_seq_interp
Error   9   error LNK2001: unresolved external symbol _png_destroy_read_struct  img_seq_interp.obj  img_seq_interp
Error   10  error LNK2001: unresolved external symbol _png_create_info_struct   img_seq_interp.obj  img_seq_interp
Error   11  error LNK2001: unresolved external symbol _png_create_read_struct   img_seq_interp.obj  img_seq_interp
Error   12  error LNK2001: unresolved external symbol _png_sig_cmp  img_seq_interp.obj  img_seq_interp
Error   13  error LNK2001: unresolved external symbol _png_get_image_width  img_seq_interp.obj  img_seq_interp
Error   14  error LNK2001: unresolved external symbol _png_get_image_height img_seq_interp.obj  img_seq_interp
Error   15  error LNK2001: unresolved external symbol _png_read_end img_seq_interp.obj  img_seq_interp
Error   16  error LNK2001: unresolved external symbol _png_read_row img_seq_interp.obj  img_seq_interp
Error   17  error LNK2001: unresolved external symbol _png_get_IHDR img_seq_interp.obj  img_seq_interp
Error   18  fatal error LNK1120: 15 unresolved externals    C:\Studium\codes\vc++\img_seq_interp\Debug\img_seq_interp.exe   img_seq_interp

它是如何产生的?我是否需要一些lib来链接问题?

1 个答案:

答案 0 :(得分:0)

  

我是否需要一些lib来链接问题?

是的,您必须关联libpng