Compilation issue with C#

Compilation issue with C#

Hello,

I am trying to use the SDK in C#. It seems it requires the C++ lib libpxcclr. When I try to compile that library, I get several errors:

Error 2 error LNK2028: unresolved token (0A000021) "extern "C" enum pxcStatus __stdcall PXCSession_Create(class PXCSession * *)" (?PXCSession_Create@@$$J14YG?AW4pxcStatus@@PAPAVPXCSession@@@Z) referenced in function "public: static enum pxcmStatus __clrcall PXCMSession::CreateInstance(class PXCMSession ^ %)" (?CreateInstance@PXCMSession@@$$FSM?AW4pxcmStatus@@A$CAP$AAV1@@Z) C:\Program Files\Intel\PCSDK\framework\CSharp\libpxcclr\pxcmsession.obj libpxcclr Error 3 error LNK2028: unresolved token (0A000230) "extern "C" enum pxcStatus __stdcall PXCSession_Create(class PXCSession * *)" (?PXCSession_Create@@$$J14YG?AW4pxcStatus@@PAPAVPXCSession@@@Z) referenced in function "public: __thiscall UtilPipelineRaw::UtilPipelineRaw(class PXCSession *,wchar_t const *,bool,unsigned int,class UtilPipelineStackable *)" (??0UtilPipelineRaw@@$$FQAE@PAVPXCSession@@PB_W_NIPAVUtilPipelineStackable@@@Z) C:\Program Files\Intel\PCSDK\framework\CSharp\libpxcclr\util_pipeline_raw.obj libpxcclr Error 4 error LNK2019: unresolved external symbol "extern "C" enum pxcStatus __stdcall PXCSession_Create(class PXCSession * *)" (?PXCSession_Create@@$$J14YG?AW4pxcStatus@@PAPAVPXCSession@@@Z) referenced in function "public: __thiscall UtilPipelineRaw::UtilPipelineRaw(class PXCSession *,wchar_t const *,bool,unsigned int,class UtilPipelineStackable *)" (??0UtilPipelineRaw@@$$FQAE@PAVPXCSession@@PB_W_NIPAVUtilPipelineStackable@@@Z) C:\Program Files\Intel\PCSDK\framework\CSharp\libpxcclr\util_pipeline_raw.obj libpxcclr Error 5 error LNK2001: unresolved external symbol "extern "C" enum pxcStatus __stdcall PXCSession_Create(class PXCSession * *)" (?PXCSession_Create@@$$J14YG?AW4pxcStatus@@PAPAVPXCSession@@@Z) C:\Program Files\Intel\PCSDK\framework\CSharp\libpxcclr\pxcmsession.obj libpxcclr Error 6 error LNK1120: 3 unresolved externals C:\Program Files\Intel\PCSDK\bin\Win32\libpxcclr.dll 1 1 libpxcclr

What should I do?

 

Thank you.

 

 

7 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

i am also working on it and i will keep you updated.The only concern is if its a purely C++ file we will have to encapsulate it and then use it in C Sharp by creating a reference DLL. Although in the framework example of the SDK they have directly referenced libpxcclr as i have shown it in figure below.Please check it because libpxcclr is the most important SDK file to access the Perceptual Computing SDK.

Abhishek Nandy

I forgot to update the images...i am doing it right now please Check..

附件: 

附件尺寸
下载 vs2010.png179.84 KB
下载 vs2010-1.png183.81 KB
Abhishek Nandy

Hello,

I believe everybody understand that this lib is the core library to use the SDK... Since it's not compiling, that's the issue we have yes.

First, libpxcclr is the bridge between C# samples and the C++ library. It is prebuilt. You don’t have to rebuild it to build those C# samples. If you want to rebuild libpxcclr, it should be OK under VS2010 and VS2008 with SP1. You need a few changes if you want to rebuild it under VS2012.

Hi David,

"You need a few changes if you want to rebuild it under VS2012."

Can you detail the changes or provide a copy of libpxcclr built for VS2012?

David

First, we did not need to rebuild libpxcclr if we want to compile the C# sample. Here is my way to rebuild libpxcclr under VS2012.

1, remove the reference libpxc

2, add src/libpxc/libpxc.cpp into the solution

Now you can rebuild libpxcclr under VS2012.

David

发表评论

登录添加评论。还不是成员?立即加入