Community
cancel
Showing results for 
Search instead for 
Did you mean: 
backyardigan
Beginner
116 Views

link problem using IPP

Jump to solution

Hi, All:

I'm a beginner of IPP. After configuration followed the "Getting Started with Intel IPP", I tried some sample code which successfully went through. Then I wanna try some simple function code, like below. The problem is that this code could compile (Ctrl+F7) but failed when I tried to link using F7. It said: "unresolved external symbol _ippiMalloc_8u_C3@12 referenced in function _main"

Can anybody please help out.

Thanks,

==================================

#include "stdafx.h"
#include


int main()
{
IppiSize size={320,240};
int stride;
Ipp8u* pSrc = ippiMalloc_8u_C3(size.width,size.height,&stride);
return 0;
}

0 Kudos
1 Solution
Rob_Ottenhoff
New Contributor I
116 Views
Quoting - backyardigan

Hi, All:

I'm a beginner of IPP. After configuration followed the "Getting Started with Intel IPP", I tried some sample code which successfully went through. Then I wanna try some simple function code, like below. The problem is that this code could compile (Ctrl+F7) but failed when I tried to link using F7. It said: "unresolved external symbol _ippiMalloc_8u_C3@12 referenced in function _main"

Can anybody please help out.

Thanks,

==================================

#include "stdafx.h"
#include


int main()
{
IppiSize size={320,240};
int stride;
Ipp8u* pSrc = ippiMalloc_8u_C3(size.width,size.height,&stride);
return 0;
}

You should link your application with ippi.lib. In visual studio use properties ( of your project ) linkerinputadditional dependencies.

Regards, Rob

View solution in original post

7 Replies
Rob_Ottenhoff
New Contributor I
117 Views
Quoting - backyardigan

Hi, All:

I'm a beginner of IPP. After configuration followed the "Getting Started with Intel IPP", I tried some sample code which successfully went through. Then I wanna try some simple function code, like below. The problem is that this code could compile (Ctrl+F7) but failed when I tried to link using F7. It said: "unresolved external symbol _ippiMalloc_8u_C3@12 referenced in function _main"

Can anybody please help out.

Thanks,

==================================

#include "stdafx.h"
#include


int main()
{
IppiSize size={320,240};
int stride;
Ipp8u* pSrc = ippiMalloc_8u_C3(size.width,size.height,&stride);
return 0;
}

You should link your application with ippi.lib. In visual studio use properties ( of your project ) linkerinputadditional dependencies.

Regards, Rob

View solution in original post

pingdrop
Beginner
116 Views

I am running into the same issue. I checked and found that under the projects options that I was not refrencingia32stublib which is where the lib you mentioned resides. This did not work for me, im still getting the same error.

Ying_S_Intel
Employee
116 Views
I just trid this sample in MSVC 2008, link with ippi.lib and there is no building errors. Kind of strange.
Thanks,
Ying

pingdrop
Beginner
116 Views
Quoting - YING S (Intel)
I just trid this sample in MSVC 2008, link with ippi.lib and there is no building errors. Kind of strange.
Thanks,
Ying

That's grate. Are you using pre-compled headers? Where there any settings you had to change in VS?

backyardigan
Beginner
116 Views

You should link your application with ippi.lib. In visual studio use properties ( of your project ) linkerinputadditional dependencies.

Regards, Rob

Great! this works. I tried this method and also adding ippi.lib to project/properties/linker/command line/additional options.

Thanks a lot!

pingdrop
Beginner
116 Views
Quoting - YING S (Intel)
I just trid this sample in MSVC 2008, link with ippi.lib and there is no building errors. Kind of strange.
Thanks,
Ying

The error i keep getting is :
Error 15 error LNK2001: unresolved external symbol _ippMalloc@4 jpegbase.obj
for each of the object files that VS 2005 generates when it trys to build

In options > VC++ dirs > Lib Files i have added :
C:Program FilesIntelIPP5.3.1.064ia32lib andC:Program FilesIntelIPP5.3.1.064ia32stublib

In the project properties > linker > input > Additional Dependencies :
"C:Program FilesIntelIPP5.3.1.064ia32stublibippi.lib"

The includes and bin folders have been added to the C++ directories as well.

I have pre compiled headers disabled from the default of "use precompiled headers" to resolve an issue with stdafx.h not being included in the origal H files.

What other settings could i change to get this error to stop occuring? I have looked into trying to use the same paramters the build32.bat file uses to build the application but I dont understand batch that well. If you could provide these parameters I could bypass any issues that could be because of the IDE and run the compiler and linker directly.

Thanks,

Vladimir_Dudnik
Employee
116 Views
Hello, ippMalloc function is defined in ippCore library, so you need to add ippcore.lib into your linked libraries list.
Well, as I can see you have jpegbase.obj file which is part of JPEG sample. For IPP JPEG sample you will also need to add ipps.lib, ippcc.lib, ippcv.lib and ippj.lib
Regards,
Vladimir

Reply