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

Unable to link IPP with my program

prakrati
Beginner
186 Views
The makefile is as follows :

all:
IPPROOT=/homenc/iyaesa4/intel/ipp/6.1.2.051/em64t
gcc ipp1.c -o ipp1.o -I$(IPPROOT)/include/ $(IPPROOT)/lib/libippmmergedem64t.a $(IPPROOT)/lib/libippmemergedem64t.a $(IPPROOT)/lib/libippiemergedem64t.a $(IPPROOT)/lib/libippsemergedem64t.a $(IPPROOT)/lib/libippimergedem64t.a $(IPPROOT)/lib/libippsmergedem64t.a $(IPPROOT)/lib/libirc.a $(IPPROOT)/lib/libsvml.a $(IPPROOT)/lib/libimf.a $(IPPROOT)/lib/libiomp5.a $(IPPROOT)/lib/libippcoreem64t.a -lm -lpthread

The error message is as follows :

/homenc/iyaesa4/intel/ipp/6.1.2.051/em64t/lib/libippmemergedem64t.a(ippm00488.o)(.data+0x0): undefined reference to `mx_ippmAdd_mm_64f'
/homenc/iyaesa4/intel/ipp/6.1.2.051/em64t/lib/libippmemergedem64t.a(ippm00488.o)(.data+0x8): undefined reference to `m7_ippmAdd_mm_64f'
/homenc/iyaesa4/intel/ipp/6.1.2.051/em64t/lib/libippmemergedem64t.a(ippm00488.o)(.data+0x10): undefined reference to `u8_ippmAdd_mm_64f'
/homenc/iyaesa4/intel/ipp/6.1.2.051/em64t/lib/libippmemergedem64t.a(ippm00488.o)(.data+0x18): undefined reference to `y8_ippmAdd_mm_64f'
/homenc/iyaesa4/intel/ipp/6.1.2.051/em64t/lib/libippmemergedem64t.a(ippm00488.o)(.data+0x20): undefined reference to `e9_ippmAdd_mm_64f'
collect2: ld returned 1 exit status
make: *** [all] Error 1

I am using the method 'ippmAdd_mm_64f' for marix-matrix addition.

Kindly help me on this.

Thanks & Regards.


0 Kudos
4 Replies
Vladimir_Dudnik
Employee
186 Views
Hello,

as far as I know the order of libraries in linker command line does matter for Linux linker. So I would suggest you to change the order of ippm libraries - please try to set first libippmemerged.a and set libippmmerged.a as a second library.

Regards,
Vladimir
0 Kudos
prakrati
Beginner
186 Views
Hello

I tried with all kind of orders but with no success .Please help me

Thanks
0 Kudos
Pavel_B_Intel1
Employee
186 Views
Hi prakrati!

"emerged" library have to set before corresponded "merged" library, please try this line:

gcc ipp1.c -o ipp1.o -I$(IPPROOT)/include/ $(IPPROOT)/lib/libippmemergedem64t.a $(IPPROOT)/lib/libippmmergedem64t.a $(IPPROOT)/lib/libippiemergedem64t.a $(IPPROOT)/lib/libippimergedem64t.a $(IPPROOT)/lib/libippsemergedem64t.a $(IPPROOT)/lib/libippsmergedem64t.a $(IPPROOT)/lib/libirc.a $(IPPROOT)/lib/libsvml.a $(IPPROOT)/lib/libimf.a $(IPPROOT)/lib/libiomp5.a $(IPPROOT)/lib/libippcoreem64t.a -lm -lpthread

It should work

Pavel
0 Kudos
Naveen_G_Intel
Employee
186 Views

Hi,

Pavel is right, we are also mentioned same in the Simplified Link Instructions for the IPP Library article.

the order of the link list is important for static libraries in a Linux environment, since many of the linkers used in this environment default to operating in a single-pass mode. In this case it is best to order the library files according to the following rule: *emerged.a first, followed by *merged.a and ending with ippcore.a.

Regards,

Naveen Gv

0 Kudos
Reply