Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Link errors when use audio_video_codecs

Genady_Malinsky
Beginner
1,515 Views

I am used Intel IPP version 6.0.167 I upgraded to the Intel IPP Composer XE 2011 SP1 and ipp-samples_p_7.0.7.064. My machine OS in Win7  32-bit my DirectX version is 11. I compile it with this command:

C:\IPP\\ipp-samples\tools>buildall.bat ia32 "cl8"

I managed to build all the projects and I wrote simple tester which create the VC1VideoDecoser. 

CAutoPtr<UMC::VideoDecoder>  pVideoDec= CAutoPtr<UMC::VC1VideoDecoder>(new UMC::VC1VideoDecoder);

My tester compiled but I encountered alot of linkage errors such as:

Error 1 error LNK2005: _ippStaticInit@0 already defined in ippcore.lib(ippcore-7.0.dll) ippcorel.lib

Error 3 error LNK2019: unresolved external symbol "public: virtual __thiscall UMC::VideoData::~VideoData(void)" (??1VideoData@UMC@@UAE@XZ) referenced in function __unwindfunclet$??0VideoDecoder@UMC@@QAE@XZ$0 vc1_dec.lib

Assistance will be much appreciate.

0 Kudos
31 Replies
SergeyKostrov
Valued Contributor II
1,101 Views
>>...Error 3 error LNK2019: unresolved external symbol "public: virtual __thiscall UMC::VideoData::~VideoData(void)" A source file with implementation of VideoData::~VideoData destructor is not included. Note: In a namespace UMC.
0 Kudos
Genady_Malinsky
Beginner
1,101 Views
Hi, I managed to my other linkage errors but I still got the first error: Error 1 error LNK2005: _ippStaticInit@0 already defined in ippcore.lib(ippcore-7.0.dll) ippcorel.lib this is caused when I added this line: #pragma comment(lib,"ippcorel.lib") How can I fix it?
0 Kudos
Sergey_K_Intel
Employee
1,101 Views
Genady Malinsky wrote:

#pragma comment(lib,"ippcorel.lib")

Hi Genady, It looks like both static and dynamic libraries are used in project build. What if you don't use the above pragma? Something remaing undefined? Regards, Sergey
0 Kudos
SergeyKostrov
Valued Contributor II
1,101 Views
>>...My tester compiled but I encountered alot of linkage errors such as... Genady, could you post a complete command that compiles your sources and links all objects when trying to create an executable? >>...this is caused when I added this line: >> >>#pragma comment(lib,"ippcorel.lib") >> >>How can I fix it? You could try to comment it. My question is why did you add it? Best regards, Sergey
0 Kudos
Genady_Malinsky
Beginner
1,101 Views
Hi, I amnaged to fix this isuue by adding : #pragma comment(lib,"ippcore.lib") if I comment the "ippcorel.lib" I got another linkage erorrs. I now facng another problem. I make a wrapper, MotionJPEG2000VideoDecoder, for the UIC::JPEG2000Decoder. When I tried to load this wrapper I got Error 2 error LNK2005: "public: __thiscall UIC::ImageDataOrder::~ImageDataOrder(void)" (??1ImageDataOrder@UIC@@QAE@XZ) already defined in MotionJPEG2000_dec.lib(MotionJPEG2000_dec.obj) uic_core_static.lib I added my libs and includes: #include "stdafx.h" #include "wrapper.h" #include "atlbase.h" #include "MotionJPEG2000_dec.h" #include "umc_vc1_video_decoder.h" #include "uic_jpeg2000_dec.h" #include "umc_mpeg4_video_decoder.h" #include "umc_h263_video_decoder.h" #include "umc_h261_video_decoder.h" #include "umc_mjpeg_video_decoder.h" #pragma comment(lib,"ippacmerged.lib") #pragma comment(lib,"ippccmerged.lib") #pragma comment(lib,"ippchmerged.lib") #pragma comment(lib,"ippcvmerged.lib") #pragma comment(lib,"ippdcmerged.lib") #pragma comment(lib,"ippimerged.lib") #pragma comment(lib,"ippjmerged.lib") #pragma comment(lib,"ippmmerged.lib") #pragma comment(lib,"ipprmerged.lib") #pragma comment(lib,"ippsmerged.lib") #pragma comment(lib,"ippscmerged.lib") #pragma comment(lib,"ippsrmerged.lib") #pragma comment(lib,"ippvcmerged.lib") #pragma comment(lib,"ippvmmerged.lib") #pragma comment(lib,"ippacemerged.lib") #pragma comment(lib,"ippccemerged.lib") #pragma comment(lib,"ippchemerged.lib") #pragma comment(lib,"ippcvemerged.lib") #pragma comment(lib,"ippdcemerged.lib") #pragma comment(lib,"ippiemerged.lib") #pragma comment(lib,"ippjemerged.lib") #pragma comment(lib,"ippmemerged.lib") #pragma comment(lib,"ippremerged.lib") #pragma comment(lib,"ippsemerged.lib") #pragma comment(lib,"ippscemerged.lib") #pragma comment(lib,"ippsremerged.lib") #pragma comment(lib,"ippvcemerged.lib") #pragma comment(lib,"ippvmemerged.lib") #pragma comment(lib,"ippcorel.lib") #pragma comment(lib,"ippcore.lib") #pragma comment(lib,"ippsremerged.lib") #pragma comment(lib,"ippvcemerged.lib") #pragma comment(lib,"ippvmemerged.lib") #pragma comment(lib,"h263_dec.lib") #pragma comment(lib,"h261_dec.lib") #pragma comment(lib,"mpeg4_dec.lib") //#pragma comment(lib,"mpeg2_dec.lib") #pragma comment(lib,"jpeg.lib") #pragma comment(lib,"umc.lib") #pragma comment(lib,"vm.lib") #pragma comment(lib,"vm_plus.lib") #pragma comment(lib,"media_buffers.lib") #pragma comment(lib,"demuxer.lib") #pragma comment(lib,"color_space_converter.lib") #pragma comment(lib,"uic_core_static.lib") //#pragma comment(lib,"uic_core.lib") #pragma comment(lib,"uic_io_static.lib") //#pragma comment(lib,"uic_io.lib") #pragma comment(lib,"uic_bmp_static.lib") //#pragma comment(lib,"uic_bmp.lib") #pragma comment(lib,"uic_pnm_static.lib") //#pragma comment(lib,"uic_pnm.lib") #pragma comment(lib,"uic_jpeg_static.lib") //#pragma comment(lib,"uic_jpeg.lib") #pragma comment(lib,"uic_jpeg2000_common_l.lib") #pragma comment(lib,"uic_jpeg2000_dec_l.lib") #pragma comment(lib,"uic_transcoder_lib.lib") #pragma comment(lib,"MotionJPEG2000_dec.lib") //#pragma comment(lib,"uic_jpeg2000_enc_l.lib") #pragma comment(lib,"vc1_dec.lib") #pragma comment(lib,"vc1_common.lib") #include "D:\UMI\ACS\3rd Party\IPP\ipp-samples\audio-video-codecs\core\umc\include\umc_media_data.h" Thanks.
0 Kudos
Sergey_K_Intel
Employee
1,101 Views
Genady, First of all, you don't need all these libraries. Though they anyway are ignored by linker, it's better not to include them to keep build requirements clean. If I had to build the project like this, I would remove all IPP libraries from build process (may be except ippcorel.lib), try to build, look at undefined external references in linker output and add required libraries one by one. For example, you start build, you get "ippi symbol undefined". This means, that you need to add image processing library (or, may be CV - computer vision - library). Add "ippiemerged,lib" and "ippimerged.lib". Repeat the build. Suppose you get "ipps symbol undefined". Add "ippsemerged.lib" and "ippsmerged.lib" and so on. You can define what particular IPP library you need if you search %IPPROOT%\include\*.h files for a specific function declaration. In this case name of .h file will be the name of .lib library you need to add to build process. Regards, Sergey
0 Kudos
Genady_Malinsky
Beginner
1,101 Views
Hi, I took your advice and I comment all the IPP libs and it works but I still got errors: Error 8 error LNK2019: unresolved external symbol "public: enum UIC::BaseStream::TStatus __thiscall CMemBuffInput::Open(unsigned char const *,int)" (?Open@CMemBuffInput@@QAE?AW4TStatus@BaseStream@UIC@@PBEH@Z) referenced in function "public: virtual int __thiscall UMC::MotionJPEG2000VideoDecoder::GetFrame(class UMC::MediaData *,class UMC::MediaData *)" (?GetFrame@MotionJPEG2000VideoDecoder@UMC@@UAEHPAVMediaData@2@0@Z) MotionJPEG2000_dec.lib Error 9 error LNK2019: unresolved external symbol "void __cdecl UIC::ArrFree(void const *)" (?ArrFree@UIC@@YAXPBX@Z) referenced in function "void __cdecl UIC::DeleteArr(class UIC::ImageDataRange *)" (??$DeleteArr@VImageDataRange@UIC@@@UIC@@YAXPAVImageDataRange@0@@Z) MotionJPEG2000_dec.lib Error 10 error LNK2019: unresolved external symbol "unsigned int __cdecl UIC::ArrCountOf(void const *)" (?ArrCountOf@UIC@@YAIPBX@Z) referenced in function "void __cdecl UIC::DeleteArr(class UIC::ImageDataRange *)" (??$DeleteArr@VImageDataRange@UIC@@@UIC@@YAXPAVImageDataRange@0@@Z) MotionJPEG2000_dec.lib Error 11 error LNK2019: unresolved external symbol "void * __cdecl UIC::ArrAlloc(unsigned int,unsigned int)" (?ArrAlloc@UIC@@YAPAXII@Z) referenced in function "int * __cdecl UIC::NewArr(unsigned int,int const *)" (??$NewArr@H@UIC@@YAPAHIPBH@Z) MotionJPEG2000_dec.lib
0 Kudos
Sergey_K_Intel
Employee
1,101 Views
You need to add uic_io.lib and uic_core.lib from UIC to you linker input files. Regards, Sergey
0 Kudos
Genady_Malinsky
Beginner
1,101 Views
Hello, If you can notice above I added this code: #pragma comment(lib,"uic_core_static.lib") //#pragma comment(lib,"uic_core.lib") #pragma comment(lib,"uic_io_static.lib") //#pragma comment(lib,"uic_io.lib") I used the static libs and I get the errors above - But when I used the "comment" libs ( uic_io.lib and uic_core.lib) insted of the static libs I get system error popup when I run my tester: "The program can't start because uic_io-1.0.dll is missing from your computer. Tray reinstalling the program to fix this problem." but I got this dll in machine. c:\IPP\ipp-samples\image-codecs\uic\_bin\ia32_cl8\bin\uic_io-1.0.dll Regards.
0 Kudos
Sergey_K_Intel
Employee
1,101 Views
Genady Malinsky wrote:

because uic_io-1.0.dll is missing

Genady, set PATH=c:\IPP\ipp-samples\image-codecs\uic\_bin\ia32_cl8\bin;%PATH% Or, copy required dll to your exe folder. Regards, Sergey
0 Kudos
Genady_Malinsky
Beginner
1,101 Views
I tried to copy it to the same folder where the exe - And I still got the same error.
0 Kudos
SergeyKostrov
Valued Contributor II
1,101 Views
>>..."The program can't start because uic_io-1.0.dll is missing from your computer. Tray reinstalling the program to fix this problem." There are two ways of getting a list of all dependent DLLs for some module: - MS Depends utility ( however, it doesn't show DLLs loaded with LoadLibrary Win32 API function ) - Use a binary viewer, open uic_io-1.0.dll and search for a substring .dll As soon as you have a complete list of all DLLs used by uic_io-1.0.dll verify that they are in some system search paths. >>...I tried to copy it to the same folder where the exe - And I still got the same error... Please follow the procedure described above. There are no any miracles here and when all DLLs could be found the application will work.
0 Kudos
Genady_Malinsky
Beginner
1,101 Views
Do I need those libs (uic_io.lib and uic_core.lib)? Why can't I use the static libs insted?
0 Kudos
Sergey_K_Intel
Employee
1,101 Views
Hi Genady, The libs generated by UIC build procedure are import libs (stub libs). They do not contain functions object code, but describe corresponding DLLs, contain references to DLL tables. They are produced by linker as a result of /IMPLIB option. To have real static libs you need to substitute the final "$(LD)" command in sub-project makefiles with MS "LIB" command. Could you try IPP samples of 7.1? They have better build system, which can generate MS VS projects. Regards, Sergey
0 Kudos
Genady_Malinsky
Beginner
1,101 Views
Hi, I tried to replace the "$(LD)" command in sub-project makefiles with MS "LIB" command but I did not manage to compile it. Orig code of the ipp-samples\image-codecs\uic\src\io\uic_io\uic_io.mak: so: $(OBJS) # $(AR) $(ARFLAGS) $(OBJS) /out:"$(TARGET1)" $(LD) $(LDFLAGS) uic_core.lib /out:"$(TARGET2)" $? @if not "%VSINSTALLDIR:~-16,4%"=="2003" if not "%VSINSTALLDIR:~-5,4%"=="10.0" ( mt.exe -manifest "$(TARGET2).manifest" -outputresource:"$(TARGET2)";2 ) Changed to: so: $(OBJS) # $(AR) $(ARFLAGS) $(OBJS) /out:"$(TARGET1)" LIB $(LDFLAGS) uic_core.lib /out:"$(TARGET2)" $? @if not "%VSINSTALLDIR:~-16,4%"=="2003" if not "%VSINSTALLDIR:~-5,4%"=="10.0" ( mt.exe -manifest "$(TARGET2).manifest" -outputresource:"$(TARGET2)";2 ) I could not compile it - this is the error taken from the log file: _bin\ia32_cl8\bin\uic_io-1.0.dll.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified. NMAKE : fatal error U1077: 'if' : return code '0x1f' Stop. Regards.
0 Kudos
Sergey_K_Intel
Employee
1,101 Views
Hi Genady, Do the following comment last two lines in codec makefiles, before them insert command line to create plain static libray: $(AR) $(ARFLAGS) $(OBJS) /out:"$(IMP_LIB)" $? # $(LD) $(LDFLAGS) /out:"$(TARGET2)" $? # @if not "%VSINSTALLDIR:~-16,4%"=="2003" if not "%VSINSTALLDIR:~-5,4%"=="10.0" ( mt.exe -manifest "$(TARGET2).manifest" -outputresource:"$(TARGET2)";2 ) Now all your libs created in _bin\\stublib are static libs (not DLL import libs). They can be used in further application builds. Regards, Sergey
0 Kudos
Genady_Malinsky
Beginner
1,101 Views
Hi, Do I need to do it only in the Codec makefiles? I tried to do it in the ipp-samples\image-codecs\uic\src\io\uic_io\uic_io.mak : all: so so: $(OBJS) $(AR) $(ARFLAGS) $(OBJS) /out:"$(TARGET1)" # $(LD) $(LDFLAGS) uic_core.lib /out:"$(TARGET2)" $? # @if not "%VSINSTALLDIR:~-16,4%"=="2003" if not "%VSINSTALLDIR:~-5,4%"=="10.0" ( mt.exe -manifest "$(TARGET2).manifest" -outputresource:"$(TARGET2)";2 ) but the compilation failed in : Building: Only UIC + ******* uic_core PASSED ******* uic_io PASSED ******* uic_dds PASSED ******* uic_bmp PASSED ******* uic_pnm PASSED ******* uic_jpeg PASSED ******* uic_jpeg2000 PASSED ******* ipp_zlib PASSED ******* uic_png PASSED ******* uic_tiff PASSED ******* uic_jpegxr PASSED ******* uic_core_dotnet PASSED ******* uic_io_dotnet FAILED {see log file for details} ******* uic_jpeg_dotnet FAILED {see log file for details} ******* uic_transcoder_con FAILED {see log file for details} ******* wic_uic_codec PASSED There were errors found When I open the logs I notice that: LINK : fatal error LNK1181: cannot open input file 'uic_io.lib' NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\link.EXE"' : return code '0x49d' Stop. I looked for the uic_io.lib and it wasn't created. As you can see from the compilation uic_io Passed compilation. Can you please help?
0 Kudos
Sergey_K_Intel
Employee
1,101 Views
Hi Genady, This is why I proposed to specify IMP_LIB as an output to (AR) rule. If you look at top of uic_core.mak you will see TARGET1 = $(LIB_DIR)\uic_core_l.lib TARGET2 = $(BIN_DIR)\uic_core-1.0.dll IMP_LIB = $(STUBLIB_DIR)\uic_core.lib So, with your modification you've created uic_core_l.lib. Regards, Sergey
0 Kudos
Genady_Malinsky
Beginner
1,101 Views
Hi, I changed the make file of I tried to do it in the ipp-samples\image-codecs\uic\src\io\uic_io\uic_io.mak into this: ... all: so so: $(OBJS) $(AR) $(ARFLAGS) $(OBJS) /out:"$(IMP_LIB)" $? # $(LD) $(LDFLAGS) uic_core.lib /out:"$(TARGET2)" $? # @if not "%VSINSTALLDIR:~-16,4%"=="2003" if not "%VSINSTALLDIR:~-5,4%"=="10.0" ( mt.exe -manifest "$(TARGET2).manifest" -outputresource:"$(TARGET2)";2 ) and also the ipp-samples\image-codecs\uic\src\core\uic\uic_core.mak into this: ... so: $(OBJS) $(AR) $(ARFLAGS) $(OBJS) /out:"$(IMP_LIB)" # $(LD) $(LDFLAGS) /out:"$(TARGET2)" $? # @if not "%VSINSTALLDIR:~-16,4%"=="2003" if not "%VSINSTALLDIR:~-5,4%"=="10.0" ( mt.exe /manifest "$(TARGET2).manifest" /outputresource:"$(TARGET2)";2 ) I also changed all the codecs image into this: all: $(OBJS) $(AR) $(ARFLAGS) $(OBJS) /out:"$(IMP_LIB)" # $(LD) $(LDFLAGS) /out:"$(TARGET2)" $? # @if not "%VSINSTALLDIR:~-16,4%"=="2003" if not "%VSINSTALLDIR:~-5,4%"=="10.0" ( mt.exe -manifest "$(TARGET2).manifest" -outputresource:"$(TARGET2)";2 ) the makefiles that I changed are: bmp, dds, jpeg, jpeg2000, jpegxr, pnm, and tiff. When I tried to change the uic_png.mak I get error when compiling in the build: Building: Only UIC + ******* uic_core PASSED ******* uic_io PASSED ******* uic_dds PASSED ******* uic_bmp PASSED ******* uic_pnm PASSED ******* uic_jpeg PASSED ******* uic_jpeg2000 PASSED ******* ipp_zlib PASSED ******* uic_png PASSED ******* uic_tiff PASSED ******* uic_jpegxr PASSED ******* uic_core_dotnet PASSED ******* uic_io_dotnet PASSED ******* uic_jpeg_dotnet PASSED ******* uic_transcoder_con FAILED {see log file for details} ******* wic_uic_codec PASSED There were errors found +-----------------------------------------------------------------------------+ |-FAIL uic יום דצמ 30 16:32:17 2012 +-----------------------------------------------------------------------------+ looking into the log I notice that: link /NOLOGO /SUBSYSTEM:CONSOLE /MACHINE:I386 /LIBPATH:"_bin\ia32_cl8\stublib" /LIBPATH:"C:\Program Files\Intel\Composer XE 2011 SP1\ipp\stublib" uic_core.lib uic_io.lib uic_bmp.lib uic_pnm.lib uic_jpeg.lib uic_jpeg2000.lib uic_dds.lib uic_png.lib uic_tiff.lib uic_jpegxr.lib kernel32.lib user32.lib gdi32.lib /OUT:_bin\ia32_cl8\bin\uic_transcoder_con.exe "_bin\ia32_cl8\obj\_uic_transcoder_con\bmp.obj" "_bin\ia32_cl8\obj\_uic_transcoder_con\cmdline.obj" "_bin\ia32_cl8\obj\_uic_transcoder_con\detector.obj" "_bin\ia32_cl8\obj\_uic_transcoder_con\dicom.obj" "_bin\ia32_cl8\obj\_uic_transcoder_con\ippimage.obj" "_bin\ia32_cl8\obj\_uic_transcoder_con\jpeg.obj" "_bin\ia32_cl8\obj\_uic_transcoder_con\jpeg2k.obj" "_bin\ia32_cl8\obj\_uic_transcoder_con\pnm.obj" "_bin\ia32_cl8\obj\_uic_transcoder_con\dds.obj" "_bin\ia32_cl8\obj\_uic_transcoder_con\png.obj" "_bin\ia32_cl8\obj\_uic_transcoder_con\tiff.obj" "_bin\ia32_cl8\obj\_uic_transcoder_con\jpegxr.obj" "_bin\ia32_cl8\obj\_uic_transcoder_con\precomp.obj" "_bin\ia32_cl8\obj\_uic_transcoder_con\strnaturechar.obj" "_bin\ia32_cl8\obj\_uic_transcoder_con\timer.obj" "_bin\ia32_cl8\obj\_uic_transcoder_con\uic_transcoder_con.obj" Creating library _bin\ia32_cl8\bin\uic_transcoder_con.lib and object _bin\ia32_cl8\bin\uic_transcoder_con.exp uic_png.lib(pngread.obj) : error LNK2019: unresolved external symbol _inflateInit_ referenced in function _png_create_read_struct_2 uic_png.lib(pngread.obj) : error LNK2019: unresolved external symbol _inflate referenced in function _png_read_row uic_png.lib(pngrutil.obj) : error LNK2001: unresolved external symbol _inflate uic_png.lib(pngread.obj) : error LNK2019: unresolved external symbol _inflateEnd referenced in function _png_read_destroy uic_png.lib(png.obj) : error LNK2019: unresolved external symbol _crc32 referenced in function _png_reset_crc uic_png.lib(png.obj) : error LNK2019: unresolved external symbol _inflateReset referenced in function _png_reset_zstream uic_png.lib(pngrutil.obj) : error LNK2001: unresolved external symbol _inflateReset uic_png.lib(pngwrite.obj) : error LNK2019: unresolved external symbol _deflate referenced in function _png_write_flush uic_png.lib(pngwutil.obj) : error LNK2001: unresolved external symbol _deflate uic_png.lib(pngwrite.obj) : error LNK2019: unresolved external symbol _deflateEnd referenced in function _png_write_destroy uic_png.lib(pngwutil.obj) : error LNK2019: unresolved external symbol _deflateReset referenced in function _png_write_compressed_data_out uic_png.lib(pngwutil.obj) : error LNK2019: unresolved external symbol _deflateInit2_ referenced in function _png_write_IHDR _bin\ia32_cl8\bin\uic_transcoder_con.exe : fatal error LNK1120: 9 unresolved externals NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\link.EXE"' : return code '0x460' Stop. I changed the png to work as before and I tried to run my application - I got this error popup: "The program can't start because uic_jpeg2000-1.0.dll is missing from your computer. Tray reinstalling the program to fix this problem." I need help - Shouldn't it be static after my changing?
0 Kudos
SergeyKostrov
Valued Contributor II
1,016 Views
Hi Genady, Looking at a 1st link error: ... uic_png.lib(pngread.obj) : error LNK2019: unresolved external symbol _inflateInit_ referenced in function _png_create_read_struct_2 ... it is clear that some module is still missing.
0 Kudos
Reply