Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Problem compiling IPP program using command-line Intel c++ compiler 9.0

matoos80
Beginner
398 Views
Hi All,

I'm creating a benchmarking program that makes use of basic functions in the signal processing functions of the IPP 5.0 libraries. I'm attempting to compile from the command line in ia32 and em64t, and after setting the path/lib/include for the IPP library, I get linker errors for all the IPP functions. I believe it's because I am statically linking and I need to somehow incorporate the file ippmerged.lib, which I am not doing at the moment and don't know how.

Here is an example of the linker errors I get:
IPP41_FFTc.obj : error LNK2001: unresolved external symbol _a6_ippsFFTInitAlloc_C_32f@16
IPP41_FFTc.obj : error LNK2001: unresolved external symbol _a6_ippsCplxToReal_32fc@16
IPP41_FFTc.obj : error LNK2001: unresolved external symbol _a6_ippsFFTFwd_CToC_32f@24
IPP41_FFTc.obj : error LNK2001: unresolved external symbol _a6_ippsRealToCplx_32f@16

When you load up the command-line compiler, the enviroment is automatically setup by running the corresponding .bat file. I have included the code for the ia-32 bat file below and you'll see at the end what I have added to run the IPP environment setup bat file. What else needs to be done to avoid the linker errors?

Regards,

Matoos



[--- START COMPILER .BAT CODE ---]

@echo off
Rem Intel C++ Compiler Build Environment for 32-bit applications

echo.
echo Intel C++ Compiler 9.0 Build Environment for 32-bit applications
echo Copyright (C) 1985-2005 Intel Corporation. All rights reserved.
echo.

@call "C:Program FilesMicrosoft Visual StudioVC98BinVcvars32.bat"

echo.

SET ICPP_COMPILER90=C:Program FilesIntelCompilerC++9.0

SET INTEL_SHARED=C:Program FilesCommon FilesIntelShared Files

SET INTEL_LICENSE_FILE=C:Program FilesCommon FilesIntelLicenses

SET PATH=%ICPP_COMPILER90%Ia32Bin;%INTEL_SHARED%Ia32Bin;%PATH%

SET LIB=%ICPP_COMPILER90%Ia32Lib;%LIB%

SET INCLUDE=%ICPP_COMPILER90%Ia32Include;%INCLUDE%


SET IPP_VERS=5.0
SET IPP_ENV_BAT=ippenv.bat
echo Using Intel IPP v%IPP_VERS% for IA-32 applications
cd c:
"C:Program FilesIntelIPP\%IPP_VERS%ia32 oolsenv\%IPP_ENV_BAT%"

[--- END COMPILER .BAT CODE ---]

[--- START IPP .BAT CODE ---]

set IPPROOT=C:Program FilesIntelIPP5.0ia32
set lib=%IPPROOT%lib;%IPPROOT%stublib;%lib%
set include=%IPPROOT%include;%include%
set path=%IPPROOT%in;%path%

[--- END IPP .BAT CODE ---]
0 Kudos
1 Reply
TimP
Honored Contributor III
398 Views
If you have the appropriate IPP folder in the LIB environment, adding the name of the specific library at the end of your compile command should be sufficient. There should be an example, at least for 32-bit, in the IPP documentation.
In the EM64T case, in addition to switching the LIB environment folders to the EM64T ones, you may have to add /link /machine:amd64 to your command.
0 Kudos
Reply