Hello,
I have very limited C++ knowledge and no previous experience with Visual Studio 2015. However I am trying to compile the neo-Hookean plugin by starting a fresh Win32 project that contains the dllmain.cpp, FENeoHookeanPI.h, and FENeoHookeanPI.cpp files which can be downloaded from the FEBio website. The only difference is I have added #include "stdafx.h" to the top of the FENeoHookeanPI.cpp file and have retained some code that automatically appeared at the top of the dllmain.cpp file when the new project opened. To be clear, I copied the text within the source files downloaded from the website into source files with the same names generated from within VS2015, though I don't expect this makes a difference.
I have added the path below to the VC++ include directories using the property page as instructed in the developers manual.
C:\Program Files\febio-2.8.0\sdk\include
I have also added the path below to the VC++ library directories using the property page as instructed in the developers manual.
C:\Program Files\febio-2.8.0\sdk\lib\VS15\Debug
When I hit build a receive 24 errors of type LNK2001 and LNK2019 regarding "unresolved external symbols". Here are a few examples of the errors thrown:
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual class FEParam * __thiscall FEParamContainer::FindParameterFromData(void *)" (?FindParameterFromData@FEParamContainer@@UAEPAVFE Param@@PAX@Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual class FEParam * __thiscall FECoreBase::FindParameter(class ParamString const &)" (?FindParameter@FECoreBase@@UAEPAVFEParam@@ABVPara mString@@@Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual class FECoreBase * __thiscall FECoreBase::GetProperty(int)" (?GetProperty@FECoreBase@@UAEPAV1@H@Z)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: __thiscall FECoreFactory::FECoreFactory(unsigned int,char const *)" (??0FECoreFactory@@QAE@IPBD@Z) referenced in function "public: __thiscall FERegisterClass_T<class FENeoHookeanPI>::FERegisterClass_T<class FENeoHookeanPI>(unsigned int,char const *)" (??0?$FERegisterClass_T@VFENeoHookeanPI@@@@QAE@IPB D@Z)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall FECoreFactory::~FECoreFactory(void)" (??1FECoreFactory@@UAE@XZ) referenced in function __unwindfunclet$??0?$FERegisterClass_T@VFENeoHooke anPI@@@@QAE@IPBD@Z$0
Am I linking the correct "include" and "library" directories? Any other suggestions as to what might be going wrong here? I am using the FEBio SDK 2.8.0. downloaded from the website.
I have attached the source files I want to compile to this post.
Thanks for your help.
Regards,
Julian
I have very limited C++ knowledge and no previous experience with Visual Studio 2015. However I am trying to compile the neo-Hookean plugin by starting a fresh Win32 project that contains the dllmain.cpp, FENeoHookeanPI.h, and FENeoHookeanPI.cpp files which can be downloaded from the FEBio website. The only difference is I have added #include "stdafx.h" to the top of the FENeoHookeanPI.cpp file and have retained some code that automatically appeared at the top of the dllmain.cpp file when the new project opened. To be clear, I copied the text within the source files downloaded from the website into source files with the same names generated from within VS2015, though I don't expect this makes a difference.
I have added the path below to the VC++ include directories using the property page as instructed in the developers manual.
C:\Program Files\febio-2.8.0\sdk\include
I have also added the path below to the VC++ library directories using the property page as instructed in the developers manual.
C:\Program Files\febio-2.8.0\sdk\lib\VS15\Debug
When I hit build a receive 24 errors of type LNK2001 and LNK2019 regarding "unresolved external symbols". Here are a few examples of the errors thrown:
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual class FEParam * __thiscall FEParamContainer::FindParameterFromData(void *)" (?FindParameterFromData@FEParamContainer@@UAEPAVFE Param@@PAX@Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual class FEParam * __thiscall FECoreBase::FindParameter(class ParamString const &)" (?FindParameter@FECoreBase@@UAEPAVFEParam@@ABVPara mString@@@Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual class FECoreBase * __thiscall FECoreBase::GetProperty(int)" (?GetProperty@FECoreBase@@UAEPAV1@H@Z)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: __thiscall FECoreFactory::FECoreFactory(unsigned int,char const *)" (??0FECoreFactory@@QAE@IPBD@Z) referenced in function "public: __thiscall FERegisterClass_T<class FENeoHookeanPI>::FERegisterClass_T<class FENeoHookeanPI>(unsigned int,char const *)" (??0?$FERegisterClass_T@VFENeoHookeanPI@@@@QAE@IPB D@Z)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall FECoreFactory::~FECoreFactory(void)" (??1FECoreFactory@@UAE@XZ) referenced in function __unwindfunclet$??0?$FERegisterClass_T@VFENeoHooke anPI@@@@QAE@IPBD@Z$0
Am I linking the correct "include" and "library" directories? Any other suggestions as to what might be going wrong here? I am using the FEBio SDK 2.8.0. downloaded from the website.
I have attached the source files I want to compile to this post.
Thanks for your help.
Regards,
Julian
Comment