Community
cancel
Showing results for 
Search instead for 
Did you mean: 
rohit-dhamija
Beginner
66 Views

Static library linking issue (Mac OS X 10.5.x)

Hi,

I am working on Mac OS X 10.5.2, Xcode 3.1.2 version. One of modules of my application require JPEG compression technique, to accomplish, we are using the ijg sample ( provided in ipp-samples->image-codecs).
Below are the steps used
1. Compiled ijg sample (using build.sh)
2.Added libjpeg.ipp.a and libjpeg.ipp.dynlib created through this sample into our application
3. In our application, we followed following insructionsto link with IPP libraries STATICALLY

http://software.intel.com/en-us/articles/intel-integrated-performance-primitives-for-mac-os-how-to-l...

http://software.intel.com/en-us/articles/intel-c-compiler-for-mac-os-selecting-the-intel-compiler-in...

But the application didnot compile successfully, we are facingfollowing linker errors:
++++++++++++++++++++++++

"_ippiEncodeHuffmanStateInit_JPEG_8u", referenced from:

_start_pass_huff in libjpeg.ipp.a(jchuff.o)

"_ippiRGBToYCbCr_JPEG_8u_C3P3R", referenced from:

_rgb_ycc_convert_intellib in libjpeg.ipp.a(jccolor.o)

"_ippiEncodeHuffman8x8_JPEG_16s1u_C1", referenced from:

_encode_mcu_huff_intellib in libjpeg.ipp.a(jchuff.o)

_encode_mcu_huff_intellib in libjpeg.ipp.a(jchuff.o)

_finish_pass_huff in libjpeg.ipp.a(jchuff.o)

"_ippiGetHuffmanStatistics8x8_JPEG_16s_C1", referenced from:

_encode_mcu_gather_intellib in libjpeg.ipp.a(jchuff.o)

"_ippiSampleDownRowH2V2_Box_JPEG_8u_C1", referenced from:

_h2v2_downsample_intellib in libjpeg.ipp.a(jcsample.o)

"_ippiEncodeHuffmanStateGetBufSize_JPEG_8u", referenced from:

_start_pass_huff in libjpeg.ipp.a(jchuff.o)

"_ippiSampleDownRowH2V1_Box_JPEG_8u_C1", referenced from:

_h2v1_downsample_intellib in libjpeg.ipp.a(jcsample.o)

"_ippiEncodeHuffmanSpecGetBufSize_JPEG_8u", referenced from:

_start_pass_huff in libjpeg.ipp.a(jchuff.o)

_start_pass_huff in libjpeg.ipp.a(jchuff.o)

_jpeg_make_c_derived_tbl_intellib in libjpeg.ipp.a(jchuff.o)

"_ippiEncodeHuffmanRawTableInit_JPEG_8u", referenced from:

_jpeg_gen_optimal_table_intellib in libjpeg.ipp.a(jchuff.o)

_finish_pass_gather in libjpeg.ipp.a(jchuff.o)

_finish_pass_gather in libjpeg.ipp.a(jchuff.o)

"_ippiRGBToY_JPEG_8u_C3C1R", referenced from:

_rgb_gray_convert_intellib in libjpeg.ipp.a(jccolor.o)

"_ippiEncodeHuffmanSpecInit_JPEG_8u", referenced from:

_start_pass_huff in libjpeg.ipp.a(jchuff.o)

_start_pass_huff in libjpeg.ipp.a(jchuff.o)

_jpeg_make_c_derived_tbl_intellib in libjpeg.ipp.a(jchuff.o)

"_ippiQuantFwdTableInit_JPEG_8u16u", referenced from:

_start_pass_fdctmgr in libjpeg.ipp.a(jcdctmgr.o)

"_ippiCMYKToYCCK_JPEG_8u_C4P4R", referenced from:

_cmyk_ycck_convert_intellib in libjpeg.ipp.a(jccolor.o)

"_ippiDCTQuantFwd8x8LS_JPEG_8u16s_C1R", referenced from:

_forward_DCT_intellib in libjpeg.ipp.a(jcdctmgr.o)

ld: symbol(s) not found

collect2: ld returned 1 exit status

Build failed (14 errors)

++++++++++++++++++++++++

Please let us know detail steps to use IPP libraries statically.
NOTE: Our main purpose is to compress our raw data in JPEG format. For that we are using libraries generated by IJG sample. Is it the correct way ? Or there is some other alternative?

Thankyou.
Regards,
Rohit Dhamija

0 Kudos
1 Reply
PaulF_IntelCorp
Employee
66 Views

Hello Rohit,

Looks to me like you also need to include the IPP libraries in your link list, not just the library file created by the ijg sample (the libjpeg files you reference). I'm not familiar with the process and results for the Mac, but you since you are linking statically, you can just include all of the IPP libraries on your link line and the linker will include just what is needed. See this article for a "brute force" example of how to accomplish that:

http://software.intel.com/en-us/articles/simplified-link-instructions-for-the-ipp-library/

Note that the instructions are or Windows and Linux, but you should be able to translate this into what is necessary for the Mac. In addition, there are many other linkage instruction articles listed at the end of the article.

Paul
Reply