Doing the dynamic library tutorial but I have LNK2019 errors

时间:2015-05-04 19:22:57

标签: c++ visual-studio-2010 dll linker lnk2019

The tutorial I'm doing is this one :

https://msdn.microsoft.com/en-us/library/ms235636%28v=vs.100%29.aspx

I have vs2010 and I'm compiling everything in debug in win32. I'm pretty sure I've followed every instruction step by step. I can even find the function automatically with vs2010, but I cannot build the main project (the dll is fine)

I get the same error as the guy in the comment, which is :

1>MyExecRefsDll.obj : error LNK2019: unresolved external symbol "public: static double __cdecl MathFuncs::MyMathFuncs::Divide(double,double)" (?Divide@MyMathFuncs@MathFuncs@@SANNN@Z) referenced in function _main

1>MyExecRefsDll.obj : error LNK2019: unresolved external symbol "public: static double __cdecl MathFuncs::MyMathFuncs::Multiply(double,double)" (?Multiply@MyMathFuncs@MathFuncs@@SANNN@Z) referenced in function _main

1>MyExecRefsDll.obj : error LNK2019: unresolved external symbol "public: static double __cdecl MathFuncs::MyMathFuncs::Subtract(double,double)" (?Subtract@MyMathFuncs@MathFuncs@@SANNN@Z) referenced in function _main

1>MyExecRefsDll.obj : error LNK2019: unresolved external symbol "public: static double __cdecl MathFuncs::MyMathFuncs::Add(double,double)" (?Add@MyMathFuncs@MathFuncs@@SANNN@Z) referenced in function _main

Thank you!

0 个答案:

没有答案