Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Otto_Wesso
Beginner
109 Views

problems with Static Linking (with dispatching)

Jump to solution
Hi Forum,

i want to link my application static with dispatching. So i added the needed ippxxemerged.a, ippxxmerged.a and also the ippcore.a to my build process.
But on compiling i get many linker errors on vm_shared_object_linux32 like:
obj/vm_shared_object_linux32.o: In function 'vm_so_load':
./vm_shares_objct_linux32.c:24:undefined reference to 'dlopen'

In my opinion i don't need that function if i want to link static. Whats going wrong?

The same project works with dynamic linkage on linux and also with dynamic and static linkage on Windows.
Can you tell me where my mistake is?

Thank you.

best regards
Otto
0 Kudos
1 Solution
Ying_H_Intel
Employee
109 Views
Hi Otto,

the undefined reference to dlopenshould be defined in system library /usr/lib/libdl.so
Maybe the eclipse environment miss it. Could you check if you have libdl.so in your machine and add -ldl inthe LIBS line? If the way still don't work. Could you please send your eclispe project to me?

I try build the vm_shared_object_linux32.c in ipp-sample/speech-codec and audio-vidoe-codec with ipp static library under linux OS and commond line. Everything looks fine.So the problem may be eclipse environment miss the system library.

Best Regards,
Ying

View solution in original post

7 Replies
Ying_H_Intel
Employee
109 Views
Hi Otto,

Which IPP version are your using? is there a file named vm_shared_object_linux32 in your application?

Thanks
Ying
Otto_Wesso
Beginner
109 Views
Hi Ying,

I use the IPP Version wich was delivered with the Intel Compiler 11.1.056 Professional. I think this is version 6.1.1.056.
And yes i linked the vm_shared_object_linux32.c file in my project.

Thanks
Otto
Otto_Wesso
Beginner
109 Views
Is there nobody with an idea to dissolve this problem? I would be glad to have your explanation.

regards
Otto
Vladimir_Dudnik
Employee
109 Views
Hi Otto,

please examine how do you build VM library (which you seems to be using from IPP samples)

Regards,
Vladimir
Otto_Wesso
Beginner
109 Views
Hi Vladimir,

thanks for your answer. I made the following settings in my .pro file (I use Eclipse and qmake to build the application):

HEADERS += ./core/vm/include/vm_shared_object.h ./... (all header files in the vm directory)

SOURCES += ./core/vm/src/vm_shared_object_linux32.c ./.. (all c files in the vm directory)

LIBS += -L/opt/intel/Compiler/11.1/056/ipp/ia32/sharedlib

LIBS += -lippac -lippch -lipps -lippsc -lippsr -lippcore -lpthread

This configuration for dynamic linking works fine, but i want to link static with dispatching. So i changed the LIB settings to:

LIBS += -L/opt/intel/Compiler/11.1/056/ipp/ia32/lib

LIBS += -lippacemerged -lippacmerged -lippchemerged -lippchmerged -lippsemerged -lippsmerged \

-lippscemerged -lippscmerged -lippsremerged -lippsrmerged -lippcore -lsvml -limf -lirc -liomp5

With this configuration i got the errors described above. The INCLUDEPATH is also stated, but i didn't listed it.

On Windows i can build static, there i use the ippcorel.lib.

I hope you can use this information and tell me what i do wrong. Thank you.

best regards

Otto

Ying_H_Intel
Employee
110 Views
Hi Otto,

the undefined reference to dlopenshould be defined in system library /usr/lib/libdl.so
Maybe the eclipse environment miss it. Could you check if you have libdl.so in your machine and add -ldl inthe LIBS line? If the way still don't work. Could you please send your eclispe project to me?

I try build the vm_shared_object_linux32.c in ipp-sample/speech-codec and audio-vidoe-codec with ipp static library under linux OS and commond line. Everything looks fine.So the problem may be eclipse environment miss the system library.

Best Regards,
Ying

View solution in original post

Otto_Wesso
Beginner
109 Views
Yes, that was my mistake!!!

I added the -ldl in the LIBS line and also changed the order of the emerged and merged libs (the ipps(e)merged has to be the last one) and it works!

Great work. Thank you very much Ying and Vladimir!!

best regards
Otto
Reply