2015-03-27 5 views
1

Я пытаюсь использовать библиотеку FFmpeg и TIFF lib в моем проекте (я делаю .dll и/или .exe также). Я просмотрел ответы, приведенные здесь и в Google, и связал 64-разрядный (32-разрядный VS-проект) 64-разрядный проект/dev/include с дополнительными каталогами Include и общим/bin (библиотечные файлы) 64-разрядным для компоновщика -> Дополнительные библиографические каталоги и добавили дополнение Linker-> Additional Dependencies-> avformat.lib. Я также скопировал файлы .dll в папку проекта, но я все равно продолжаю получать LNK2019. Вот как я использую эти библиотеки и вывод компилятора:Использование FFMPEG в Visual Studio 2013 окончательный проект, ссылка ошибка LNK2019

extern "C" { 

#ifndef inline 
#define inline __inline 
#endif 
#ifndef UINT64_C 
#define UINT64_C uint64_t 
#define INT64_C int64_t 
#endif 

#include <libavcodec\avcodec.h> 
#include <libavformat\avformat.h> 
#include <libswscale\swscale.h> 

} 
#pragma comment(lib, "avformat.lib") 

1>------ Build started: Project: GHSOM_V3, Configuration: FFmpeg x64 ------ 
1> ffmpeg_io.cpp 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol av_malloc referenced in function "struct AVFrame * __cdecl alloc_picture(enum AVPixelFormat,int,int)" ([email protected]@[email protected]@[email protected]@[email protected]) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol av_free referenced in function "struct AVFrame * __cdecl alloc_picture(enum AVPixelFormat,int,int)" ([email protected]@[email protected]@[email protected]@[email protected]) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol av_freep referenced in function "void __cdecl aviCloseWriter(struct tagAVIWriter *)" ([email protected]@[email protected]@@Z) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol av_rescale_q referenced in function "void __cdecl aviWriteFrame(struct tagAVIWriter *,unsigned char *)" ([email protected]@[email protected]@[email protected]) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol av_frame_alloc referenced in function "struct AVFrame * __cdecl alloc_picture(enum AVPixelFormat,int,int)" ([email protected]@[email protected]@[email protected]@[email protected]) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avcodec_open2 referenced in function "void __cdecl initiate_avi_create(struct tagAVIWriter *,int,int)" ([email protected]@[email protected]@[email protected]) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avcodec_close referenced in function "void __cdecl aviCloseReader(struct tagAVIReader *)" ([email protected]@[email protected]@@Z) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol av_init_packet referenced in function "void __cdecl aviWriteFrame(struct tagAVIWriter *,unsigned char *)" ([email protected]@[email protected]@[email protected]) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol av_free_packet referenced in function "void __cdecl aviReadFrame(struct tagAVIReader *,unsigned char *,int)" ([email protected]@[email protected]@[email protected]) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avcodec_find_decoder referenced in function "void __cdecl initiate_avi_open(struct tagAVIReader *)" ([email protected]@[email protected]@@Z) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avcodec_decode_video2 referenced in function "void __cdecl aviReadFrame(struct tagAVIReader *,unsigned char *,int)" ([email protected]@[email protected]@[email protected]) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avcodec_find_encoder referenced in function "void __cdecl initiate_avi_create(struct tagAVIWriter *,int,int)" ([email protected]@[email protected]@[email protected]) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avcodec_find_encoder_by_name referenced in function "void __cdecl initiate_avi_create(struct tagAVIWriter *,int,int)" ([email protected]@[email protected]@[email protected]) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avcodec_encode_video referenced in function "void __cdecl aviWriteFrame(struct tagAVIWriter *,unsigned char *)" ([email protected]@[email protected]@[email protected]) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avpicture_fill referenced in function "struct AVFrame * __cdecl alloc_picture(enum AVPixelFormat,int,int)" ([email protected]@[email protected]@[email protected]@[email protected]) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avpicture_get_size referenced in function "struct AVFrame * __cdecl alloc_picture(enum AVPixelFormat,int,int)" ([email protected]@[email protected]@[email protected]@[email protected]) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol sws_getContext referenced in function "void __cdecl initiate_avi_create(struct tagAVIWriter *,int,int)" ([email protected]@[email protected]@[email protected]) 
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol sws_scale referenced in function "void __cdecl aviReadFrame(struct tagAVIReader *,unsigned char *,int)" ([email protected]@[email protected]@[email protected]) 
1>tiff_io.obj : error LNK2019: unresolved external symbol TIFFClose referenced in function "void __cdecl tiffReadRGBA(char *,int *,int *,unsigned char *)" ([email protected]@[email protected]) 
1>tiff_io.obj : error LNK2019: unresolved external symbol TIFFGetField referenced in function "void __cdecl tiffReadRGBA(char *,int *,int *,unsigned char *)" ([email protected]@[email protected]) 
1>tiff_io.obj : error LNK2019: unresolved external symbol TIFFSetField referenced in function "void __cdecl tiffWriteRGBA(char *,int,int,unsigned char *)" ([email protected]@[email protected]) 
1>tiff_io.obj : error LNK2019: unresolved external symbol TIFFReadRGBAImage referenced in function "void __cdecl tiffReadRGBA(char *,int *,int *,unsigned char *)" ([email protected]@[email protected]) 
1>tiff_io.obj : error LNK2019: unresolved external symbol TIFFOpen referenced in function "void __cdecl tiffReadRGBA(char *,int *,int *,unsigned char *)" ([email protected]@[email protected]) 
1>tiff_io.obj : error LNK2019: unresolved external symbol TIFFWriteEncodedStrip referenced in function "void __cdecl tiffWriteRGBA(char *,int,int,unsigned char *)" ([email protected]@[email protected]) 
1>Video.obj : error LNK2019: unresolved external symbol "void __cdecl DCT2d(double *,double *,long,long)" ([email protected]@[email protected]) referenced in function "void __cdecl ForwardDCT(class DataShuffle *,unsigned char *,char *,int,int,int,int,int,bool)" ([email protected]@[email protected]@[email protected]) 
1>Video.obj : error LNK2019: unresolved external symbol "void __cdecl IDCT2d(double *,double *,long,long)" ([email protected]@[email protected]) referenced in function "void __cdecl ExportVideoFromDCT(class DataShuffle *,char *,char *,int,int,int,int)" ([email protected]@[email protected]@[email protected]) 
1>Video.obj : error LNK2019: unresolved external symbol "void __cdecl CopyToZigZag(double *,double *,long,long,long)" ([email protected]@[email protected]) referenced in function "void __cdecl ForwardDCT(class DataShuffle *,unsigned char *,char *,int,int,int,int,int,bool)" ([email protected]@[email protected]@[email protected]) 
1>Video.obj : error LNK2019: unresolved external symbol "void __cdecl CopyFromZigZag(double *,double *,long,long,long)" ([email protected]@[email protected]) referenced in function "void __cdecl ExportVideoFromDCT(class DataShuffle *,char *,char *,int,int,int,int)" ([email protected]@[email protected]@[email protected]) 

ответ

1

Вы должны связать другие библиотеки FFmpeg, а также (avcodec, avutil и т.д.). То же самое для libtiff.

 Смежные вопросы

  • Нет связанных вопросов^_^