I am getting error LNK2001 when i try to use my dll project in another project.
Code for my header File is
#ifdef VIZFUNCTIONSDLL_EXPORTS
#define VIZFUNCTIONSDLL_API __declspec(dllexport)
#else
#define VIZFUNCTIONSDLL_API __declspec(dllimport)
#endif
namespace VizFunctions
{
class SUMCLASS
{
public:
static VIZFUNCTIONSDLL_API double Test(double a);
};
}
Code for my Source file is
// VizFunctions.cpp : Defines the exported functions for the DLL application.
//
#include "stdafx.h"
#include "VizFunctions.h"
#include <stdexcept>
namespace VizFunctions
{
double SUMCLASS::Test(double a)
{
return a;
}
}
Error message
Error 13 error LNK2019: unresolved external symbol "public: static double
__cdecl VizFunctions::SUMCLASS::Test(double)"
(?Test@SUMCLASS@VizFunctions@@SANN@Z) referenced in function "public:
int __thiscall CRectangle::PlugInNewGeom(int)" (?PlugInNewGeom@CRectangle@@QAEHH@Z)
C:\Program Files (x86)\vizrt\Viz3\plugin\src\examples\rectangle\Rectangle.obj SampleRectangle