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

Linking IPP question

ligoban
Beginner
381 Views

I have a question about linking IPP. I want to create a g722_codec.a to use it later in my application. For this I wrote this makefile and used it before using the IPP (the whole code was in my C file):

-----------------------------------------------

CXX=cc
LIB=libg722.a
CFLAGS+=-fPIC
ECHO_PREFIX=@
CMD_PREFIX=@
OBJS=g722_codec.o
all: $(LIB)
$(LIB): $(OBJS)
$(ECHO_PREFIX) echo " [AR] $^ -> $@"
$(CMD_PREFIX) $(AR) cr $@ $^
$(CMD_PREFIX) $(RANLIB) $@
clean:
rm -f $(LIB) *.o

------------------------------------------------

In my C source code I do besides allthe following things:

------------------------------------

=== g722_codec.h

//Include IPP
#include "/opt/intel/ipp/5.1/ia32/include/ipp.h"
#include "/opt/intel/ipp/5.1/ia32/include/ipps.h"
#include "/opt/intel/ipp/5.1/ia32/include/ippsc.h"
#include "/misc/ipp_sample/speech-coding/codec/include/usc.h"
//............

----------------------------------

=== g722_codec.c

//.........
extern USC_Fxns USC_G722_Fxns;
//...........
intg722_encode_init() {
USC_FxnsUSC_Gxxx_Fnxs = &USC_G722_Fxns;
//.........
}
//.......................

--------------------------------------------

What should I add to my makefile to run my application, using the g722_codec.a, correctly? It is not difficult to see that I get

Undefinedsymbol: USC_G722_Fxns

when I start running my application.

I need to link IPP vocoder functionality exactly to the g722_codec.a.

Thank you. (Excuse me forediting the message).

P.S. Finally we managed to buy the IPP.



0 Kudos
4 Replies
ligoban
Beginner
381 Views
Up.
0 Kudos
Vladimir_Dudnik
Employee
381 Views

Might be I did not understand you correctly, but it seems you produce with your makefile libg722.a but want to link with libg722_codec.a. That might be a reason of error message.

Vladimir

0 Kudos
ligoban
Beginner
381 Views

No, it's not the reason. I add the following to the up-level application that uses the libg722.a:

LIBS+=/opt/intel/ipp/5.1/ia32/sharedlib/libippcore.so.

5.1 /misc/ipp_5_1/ipp_sample/speechcoding/bin/ia32/lib/libusc.a

/opt/intel/ipp/5.1/ia32/sharedlib/libippsc.so.5.1 /opt/intel/ipp/5.1/ia32/sharedlib/libipps.so.5.1

and everything works well. I want to add the IPP functionality exactly to the libg722.a - that means that I want to link the merged IPP libraries (*.a) to avoid using shared libraries. How can I manage to do this?

0 Kudos
Vladimir_Dudnik
Employee
381 Views

Please paid attention that Linux linker is single-pass utility, so order in which you specify libraries to link with in command line is important under Linux.

Vladimir

0 Kudos
Reply