0

I am trying to use the Affdex SDK to determine the emotions of someone through facial recognition. When on their website it says the first thing to do is to create a CameraDetector. They say to do:

CameraDetector detector = new CameraDetector();

But this will give me this error when building my project in Visual Studios Express 2013:

Error   1   error C2440: 'initializing' : cannot convert from 
'affdex::CameraDetector *' to 'affdex::CameraDetector'  

So I made the detector a pointer. Now when I build I get this error:

Error   1   error LNK2019: unresolved external symbol "__declspec(dllimport) 
public: __thiscall 
affdex::CameraDetector::CameraDetector(int,double,double,unsigned int,enum 
affdex::FaceDetectorMode)" (__imp_??
0CameraDetector@affdex@@QAE@HNNIW4FaceDetectorMode@1@@Z) referenced in 
function _main

I am pretty sure that I have the SDK lined properly. I followed the tutorial that is on the Affdex development website. My main file looks like this:

#include <Face.h>
#include <FaceListener.h>
#include <Frame.h>
#include <FrameDetector.h>
#include <ImageListener.h>
#include <PhotoDetector.h>
#include <ProcessStatusListener.h>
#include <typedefs.h>
#include <VideoDetector.h>

using namespace affdex;

int main() {
    CameraDetector *detector = new CameraDetector();
}

Is this wrong? Why am I getting a LNK2019 error?

  • Literally none of that "duplicated question" helped. I had already looked at that. I linked all the .lib's properly. This question is specifically asking about that error with respect to the Affdex SDK. – Ethan Harte Jan 30 '16 at 23:49
  • 1
    I found out what was causing it. I was using the 64bit version of the sdk. For some reason I was not able to do that. When I am using the 32bit sdk I can compile it. – Ethan Harte Jan 31 '16 at 00:03
  • The tutorial is using C# not C++ syntax .. hence the syntax error. – ahamino Feb 07 '16 at 16:57

0 Answers0