Cannot compile Nvidia NPP example boxFilter.cpp will not compile.

I am running win7 64-bit with GTX295 card.



I first changed my linker input to:

cudart.lib

libnpp-mt-x64.lib

FreeImage64.lib



I added the include directories:

Include: …SDK\common\npp\include

…SDK\common\FreeImage\include

…SDK\common\UtilNPP

Library: …SDK\common\lib

…SDK\common\FreeImage\lib



I am using Debug x64.



I get the following errors:



1>------ Rebuild All started: Project: boxFilter, Configuration: Debug x64 ------

1>Deleting intermediate and output files for project 'boxFilter', configuration 'Debug|x64'

1>Compiling…

1>boxFilter.cpp

1>Compiling manifest to resources…

1>Microsoft ® Windows ® Resource Compiler Version 6.0.5724.0

1>Copyright © Microsoft Corporation. All rights reserved.

1>Linking…

1>boxFilter.obj : error LNK2019: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl npp::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class npp::Exception const &)" (??6npp@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV12@AEBVException@0@@Z) referenced in function main$catch$0

1>boxFilter.obj : error LNK2019: unresolved external symbol "void __cdecl npp::saveImage(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class npp::ImageCPU<unsigned char,1,class npp::AllocatorCPU<unsigned char,1> > const &)" (?saveImage@npp@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV?$ImageCPU@E$00V?$AllocatorCPU@E$00@npp@@@1@@Z) referenced in function main

1>boxFilter.obj : error LNK2019: unresolved external symbol "public: __cdecl npp::Exception::Exception(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int)" (??0Exception@npp@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0I@Z) referenced in function main

1>boxFilter.obj : error LNK2019: unresolved external symbol "void __cdecl npp::loadImage(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class npp::ImageCPU<unsigned char,1,class npp::AllocatorCPU<unsigned char,1> > &)" (?loadImage@npp@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAV?$ImageCPU@E$00V?$AllocatorCPU@E$00@npp@@@1@@Z) referenced in function main

1>boxFilter.obj : error LNK2001: unresolved external symbol "public: virtual __cdecl npp::Exception::~Exception(void)" (??1Exception@npp@@UEAA@XZ)

1>boxFilter.obj : error LNK2001: unresolved external symbol "public: __cdecl npp::Exception::Exception(class npp::Exception const &)" (??0Exception@npp@@QEAA@AEBV01@@Z)

1>boxFilter.obj : error LNK2019: unresolved external symbol "public: __cdecl npp::Image::Size::Size(struct npp::Image::Size const &)" (??0Size@Image@npp@@QEAA@AEBU012@@Z) referenced in function "public: struct npp::Image::Size __cdecl npp::Image::size(void)const " (?size@Image@npp@@QEBA?AUSize@12@XZ)

1>boxFilter.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl npp::Image::~Image(void)" (??1Image@npp@@UEAA@XZ) referenced in function "public: virtual __cdecl npp::ImagePacked<unsigned char,1,class npp::AllocatorCPU<unsigned char,1> >::~ImagePacked<unsigned char,1,class npp::AllocatorCPU<unsigned char,1> >(void)" (??1?$ImagePacked@E$00V?$AllocatorCPU@E$00@npp@@@npp@@UEAA@XZ)

1>boxFilter.obj : error LNK2019: unresolved external symbol "public: __cdecl npp::Image::Image(void)" (??0Image@npp@@QEAA@XZ) referenced in function "public: __cdecl npp::ImagePacked<unsigned char,1,class npp::AllocatorCPU<unsigned char,1> >::ImagePacked<unsigned char,1,class npp::AllocatorCPU<unsigned char,1> >(void)" (??0?$ImagePacked@E$00V?$AllocatorCPU@E$00@npp@@@npp@@QEAA@XZ)

1>boxFilter.obj : error LNK2019: unresolved external symbol "public: __cdecl npp::Image::Image(struct npp::Image::Size const &)" (??0Image@npp@@QEAA@AEBUSize@01@@Z) referenced in function "public: __cdecl npp::ImagePacked<unsigned char,1,class npp::AllocatorCPU<unsigned char,1> >::ImagePacked<unsigned char,1,class npp::AllocatorCPU<unsigned char,1> >(struct npp::Image::Size const &)" (??0?$ImagePacked@E$00V?$AllocatorCPU@E$00@npp@@@npp@@QEAA@AEBUSize@Image@1@@Z)

1>boxFilter.obj : error LNK2019: unresolved external symbol "public: __cdecl npp::Image::Image(unsigned int,unsigned int)" (??0Image@npp@@QEAA@II@Z) referenced in function "public: __cdecl npp::ImagePacked<unsigned char,1,class npp::Allocator<unsigned char,1> >::ImagePacked<unsigned char,1,class npp::Allocator<unsigned char,1> >(unsigned int,unsigned int)" (??0?$ImagePacked@E$00V?$Allocator@E$00@npp@@@npp@@QEAA@II@Z)

1>c:\CUDA\NPP_1_1_Windows64\SDK\samples\boxFilter\…\…\bin\x64\boxFilter-mt-gd-x64.exe : fatal error LNK1120: 11 unresolved externals

1>Build log was saved at "file://c:\CUDA\NPP_1_1_Windows64\SDK\obj\x64\Debug\boxFilter\BuildLog.htm"

1>boxFilter - 12 error(s), 0 warning(s)

========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========



PLEASE HELP! THANKS1

Problem Solved.

What you want to do is compile the SDK_vc9 solution, which in turns helps to compile all of the examples.

From there, I just opened up each example solution and ran them (without re-compiling).

This seems to have worked for me.

Hi,

I want to try to use NPP and opencv together. Before I have to practice with NPP…

I obtained the same errors compiling the “boxFilter” project (with a similar system win7pro 64 and a gtx260), so I searched on google and I found your thread.

So I tried to rebuilt the solution but I obtain three errors for the three examples:

error PRJ0019: A tool returned an error code from “Copying DLLs…”

I copied all the dll required in the project folder, but doesn’t work

I hope that someone could help me

Have a nice

Salitol

Hi,

I want to try to use NPP and opencv together. Before I have to practice with NPP…

I obtained the same errors compiling the “boxFilter” project (with a similar system win7pro 64 and a gtx260), so I searched on google and I found your thread.

So I tried to rebuilt the solution but I obtain three errors for the three examples:

error PRJ0019: A tool returned an error code from “Copying DLLs…”

I copied all the dll required in the project folder, but doesn’t work

I hope that someone could help me

Have a nice

Salitol