- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I'm trying to use Intel IPP for signal processing. I began the work with the Add functions (ippsAdd_64f_A53 and ippsAdd_64f). I included ippvm.h, ippcore.h and ipps.h and wrote the CMakeLists.txt file as follows:
cmake_minimum_required(VERSION 3.7) project(Test) find_library(IPP_CORE libippcore.a PATHS /opt/intel/ipp/lib/intel64) find_library(IPP_VM libippvm.a PATHS /opt/intel/ipp/lib/intel64) find_library(IPP_S libipps.a PATHS /opt/intel/ipp/lib/intel64) add_executable(Test main.cpp) target_include_directories(Test PRIVATE /opt/intel/ipp/include) target_link_libraries(Test ${IPP_CORE} ${IPP_VM} ${IPP_S})
The first of the function (_A53) works well, but while using the second one I get the following error:
/opt/intel/ipp/lib/intel64/libipps.a(jmp_ippsAdd_64f.o): In function 'in_ippsAdd_64f': jmp_ippsAdd_64f.c:(.text+0x1): undefined reference to 'ippSafeInit' /opt/intel/ipp/lib/intel64/libipps.a(jmp_ippsAdd_64f.o): In function 'ippsAdd_64f': jmp_ippsAdd_64f.c:(.text+0x2a): undefined reference to 'ippJumpIndexForMergedLibs'
Tell me please, what is wrong? As I understand, I need to link some more libraries, but which of them?
Thanks in advance.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
+ ipps.a
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, but as I understand you recomend including libipps.a. But I've already included it with:
find_library(IPP_S libipps.a PATHS /opt/intel/ipp/lib/intel64) ... target_link_libraries(Test ${IPP_CORE} ${IPP_VM} ${IPP_S})
Could you, please explain my mistake?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sorry, I missed that you added ipps.a lib, then at the first galnce everything looks correct. Could you try to link this case explicitly w/o Cmake?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Try to change the order of the libraries in "target_link_libraries" statement. First IPPS, then IPPVM and CORE at the end.
It's important for Linux linker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey Khlystov (Intel) wrote:
Hello,
Try to change the order of the libraries in "target_link_libraries" statement. First IPPS, then IPPVM and CORE at the end.
It's important for Linux linker.
Thank you for the reply. I've tried - unfortunately it doesn't help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Gennady F. (Intel) wrote:
sorry, I missed that you added ipps.a lib, then at the first galnce everything looks correct. Could you try to link this case explicitly w/o Cmake?
Yes, it works with both dynamic and static linking through using g++ command.
Now what could it be with cmake? I would be grateful for your help. Because g++ command is ok for test application, but not for the whole project))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The answer appeared to be quite simple: cmake somehow links a static version of ipps and dynamic versions of other libs. As I understand, IPP needs to be whole static or whole dynamic. To do so I added
set(IPP_STATIC "ON")
to CMakeLists.txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see those names in several of the of the other ipp libs ... try adding more until the references are resolved. e.g., try adding
find_library(IPP_I libippi.a PATHS /opt/intel/ipp/lib/intel64)
...
target_link_libraries(Test ${IPP_CORE} ${IPP_VM} ${IPP_S} ${IPP_I})
Also, I don't know if order matters (it matters to the linker), but it seems that the most
general library should be at the end :
target_link_libraries(Test ${IPP_S} ${IPP_I}${IPP_VM} ${IPP_CORE})
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page