0

Here is my simple setup: (i've hidden lots of unneeded information)

//AutoFocusTest.h
#include "camAVTEx.h"

class CAutoFocusTestApp : public CWinApp
{
protected:
    camera_t* mCamera;

public:
    virtual BOOL InitInstance();
};

//camAVTEx.h
class camera_avtcam_ex_t : public camera_t
{
public:
    camera_avtcam_ex_t();
    virtual ~camera_avtcam_ex_t();

    //member variables

    //member function declarations
}

//camAVTEx.cpp
#include "camAVTEx.h"

camera_avtcam_ex_t::camera_avtcam_ex_t()
{
    //stuff
}

camera_avtcam_ex_t::~camera_avtcam_ex_t()
{
    //stuff
}

//the rest are defined here in my program

//AutoFocusTest.cpp
#include AutoFocusTest.h

BOOL CAutoFocusTestApp::InitInstance()
{
    mCamera = new camera_avtcam_ex_t();
}

This setup produces the error:

3>AutoFocusTest.obj : error LNK2001: unresolved external symbol "public: __cdecl camera_avtcam_ex_t::camera_avtcam_ex_t(void)" (??0camera_avtcam_ex_t@@QEAA@XZ)

From everything I've read on this relatively common problem, I have not linked something causing my camera_avtcam_ex_t function definitions to not be found. However, I can't figure out what I could have missed. I have added all of the include directories and library directories, as well as added the library files to the additional dependencies section.

Can anyone spot anything that I might be missing?

xcdemon05
  • 1,372
  • 5
  • 25
  • 49

1 Answers1

1

Assuming you have defined the constructor for your camera_avtcam_ex_t, it's declared as private, you can't instantiate it.

SomeWittyUsername
  • 18,025
  • 3
  • 42
  • 85