如何解决“dllmain.obj:错误LNK2019:未解析的外部符号”public"制作DLL项目时出错? [英] How to solve “dllmain.obj : error LNK2019: unresolved external symbol ”public" error while making a DLL project?

查看:75
本文介绍了如何解决“dllmain.obj:错误LNK2019:未解析的外部符号”public"制作DLL项目时出错?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好吧

我想为软件制作一个插件。为了制作插件,我应该制作一个dll文件(带有dll扩展名的文件),但是我遇到了很多关于制作它的挑战。我的系统是Windows 7,我使用Microsoft Visual Studio 2010作为IDE。我做了一个dll项目并制作了两个源文件和一个头文件,然后我构建了解决方案,但是我遇到了以下错误,(在构建解决方案之前,我添加了软件的include和lib目录的路径)。如果有人可以帮我解决这个问题,我将不胜感激。

Hi every body
I want to make a plugin for a software. In order to make the plugin, I should make a dll file (a file with dll extension) but I have faced many challenges about making it . my system is windows 7 and I'm using Microsoft visual studio 2010 as an IDE. I made a dll project and made two source files, and one header file and then I build the solution but I encountered the following errors, (before building the solution I added the path of include and lib directories of the software). I would appreciate if someone could help me with this problem.

::FERegisterClass_T<class FENeoHookeanPI>(unsigned int,char const *)" (??0?$FERegisterClass_T@VFENeoHookeanPI@@@@QAE@IPBD@Z)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: static class FECoreKernel & __cdecl FECoreKernel::GetInstance(void)" (?GetInstance@FECoreKernel@@SAAAV1@XZ) referenced in function "public: __thiscall FERegisterClass_T<class FENeoHookeanPI>::FERegisterClass_T<class FENeoHookeanPI>(unsigned int,char const *)" (??0?$FERegisterClass_T@VFENeoHookeanPI@@@@QAE@IPBD@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@IPBD@Z)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: __thiscall FEElasticMaterial::FEElasticMaterial(class FEModel *)" (??0FEElasticMaterial@@QAE@PAVFEModel@@@Z) referenced in function "public: __thiscall FENeoHookeanPI::FENeoHookeanPI(class FEModel *)" (??0FENeoHookeanPI@@QAE@PAVFEModel@@@Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual class FEParam * __thiscall FEMaterial::GetParameter(class ParamString const &)" (?GetParameter@FEMaterial@@UAEPAVFEParam@@ABVParamString@@@Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall FEMaterial::Serialize(class DumpFile &)" (?Serialize@FEMaterial@@UAEXAAVDumpFile@@@Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall FEElasticMaterial::SetAttribute(char const *,char const *)" (?SetAttribute@FEElasticMaterial@@UAE_NPBD0@Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall FEMaterial::Properties(void)" (?Properties@FEMaterial@@UAEHXZ)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual class FECoreBase * __thiscall FEMaterial::GetProperty(int)" (?GetProperty@FEMaterial@@UAEPAVFECoreBase@@H@Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall FEMaterial::FindPropertyIndex(char const *)" (?FindPropertyIndex@FEMaterial@@UAEHPBD@Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall FEMaterial::SetProperty(int,class FECoreBase *)" (?SetProperty@FEMaterial@@UAE_NHPAVFECoreBase@@@Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall FESolidMaterial::Density(void)" (?Density@FESolidMaterial@@UAENXZ)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall FEElasticMaterial::SetLocalCoordinateSystem(class FEElement &,int,class FEMaterialPoint &)" (?SetLocalCoordinateSystem@FEElasticMaterial@@UAEXAAVFEElement@@HAAVFEMaterialPoint@@@Z)
1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall FEElasticMaterial::StrainEnergyDensity(class FEMaterialPoint &)" (?StrainEnergyDensity@FEElasticMaterial@@UAENAAVFEMaterialPoint@@@Z)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: __thiscall FEElasticMaterialPoint::FEElasticMaterialPoint(void)" (??0FEElasticMaterialPoint@@QAE@XZ) referenced in function "public: virtual class FEMaterialPoint * __thiscall FEElasticMaterial::CreateMaterialPointData(void)" (?CreateMaterialPointData@FEElasticMaterial@@UAEPAVFEMaterialPoint@@XZ)
1>dllmain.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall FEElasticMaterial::~FEElasticMaterial(void)" (??1FEElasticMaterial@@UAE@XZ) referenced in function "public: virtual __thiscall FENeoHookeanPI::~FENeoHookeanPI(void)" (??1FENeoHookeanPI@@UAE@XZ)
1>FENeoHookeanPI.obj : error LNK2019: unresolved external symbol "protected: void __thiscall FEParamContainer::AddParameter(void *,enum FEParamType,int,class RANGE,char const *)" (?AddParameter@FEParamContainer@@IAEXPAXW4FEParamType@@HVRANGE@@PBD@Z) referenced in function "protected: virtual void __thiscall FENeoHookeanPI::BuildParamList(void)" (?BuildParamList@FENeoHookeanPI@@MAEXXZ)
1>FENeoHookeanPI.obj : error LNK2019: unresolved external symbol "protected: virtual void __thiscall FESolidMaterial::BuildParamList(void)" (?BuildParamList@FESolidMaterial@@MAEXXZ) referenced in function "protected: virtual void __thiscall FENeoHookeanPI::BuildParamList(void)" (?BuildParamList@FENeoHookeanPI@@MAEXXZ)
1>FENeoHookeanPI.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall FEElasticMaterial::Init(void)" (?Init@FEElasticMaterial@@UAEXXZ) referenced in function "public: virtual void __thiscall FENeoHookeanPI::Init(void)" (?Init@FENeoHookeanPI@@UAEXXZ)
1>FENeoHookeanPI.obj : error LNK2019: unresolved external symbol "public: class mat3ds __thiscall FEElasticMaterialPoint::LeftCauchyGreen(void)" (?LeftCauchyGreen@FEElasticMaterialPoint@@QAE?AVmat3ds@@XZ) referenced in function "public: virtual class mat3ds __thiscall FENeoHookeanPI::Stress(class FEMaterialPoint &)" (?Stress@FENeoHookeanPI@@UAE?AVmat3ds@@AAVFEMaterialPoint@@@Z)
1>C:\Users\pars\Desktop\example\FEneohookean\Debug\FEneohookean.dll : fatal error LNK1120: 21 unresolved externals
1>
1>Build FAILED.
1>">



谢谢,

Faezeh



我尝试了什么:



我查了一下目录和库我也问过人们


Thanks,
Faezeh

What I have tried:

I have checked the directories and libraries and I have also asked people

推荐答案

FERegisterClass_T @ VFENeoHookeanPI @@@@ QAE @ IPBD @ Z)
1> dllmain.obj:错误LNK2019:未解析的外部符号 public static FECoreKernel& __cdecl FECoreKernel :: GetInstance( void (?GetInstance @ FECoreKernel @@ SAAAV1 @ XZ)在函数引用 <跨度类= 代码关键字>公共:__thiscall FERegisterClass_T<类FENeoHookeanPI> :: FERegisterClass_T<类FENeoHookeanPI>(无符号<跨度类=code-keyword> int char const *) (?? 0?
FERegisterClass_T@VFENeoHookeanPI@@@@QAE@IPBD@Z) 1>dllmain.obj : error LNK2019: unresolved external symbol "public: static class FECoreKernel & __cdecl FECoreKernel::GetInstance(void)" (?GetInstance@FECoreKernel@@SAAAV1@XZ) referenced in function "public: __thiscall FERegisterClass_T<class FENeoHookeanPI>::FERegisterClass_T<class FENeoHookeanPI>(unsigned int,char const *)" (??0?


FERegisterClass_T @ VFENeoHookeanPI @@@@ QAE @ IPBD @ Z)
1> dllmain.obj:错误LNK2019:未解析的外部符号 public :__ thishisall FECoreFactory :: FECoreFactory(unsigned int char const *) (?? 0FECoreFactory @@ QAE @ IPBD @ Z)r eferenced在函数 <跨度类= 代码关键字 >公共:__thiscall FERegisterClass_T<类FENeoHookeanPI> :: FERegisterClass_T<类FENeoHookeanPI>(无符号的 INT char const *) (?? 0?
FERegisterClass_T@VFENeoHookeanPI@@@@QAE@IPBD@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 @ IPBD @ Z)
1> dllmain.obj :错误LNK2019:未解析的外部符号 public :__ thishisall FEElasticMaterial :: FEElasticMaterial( class FEModel *) (?? 0FEElasticMaterial @@ QAE @ PAVFEModel @@@ Z)在函数 <中引用span class =code-keyword> public :__ thishisall FENeoHookeanPI :: FENeoHookeanPI( class FEModel *) (?? 0FEN eoHookeanPI @@ QAE @ PAVFEModel @@@ Z)
1> dllmain.obj:错误LNK2001:未解析的外部符号
public virtual class FEParam * __thiscall FEMaterial :: GetParameter( class ParamString const &) (?GetParameter @ FEMaterial @@ UAEPAVFEParam @@ ABVParamString @@@ Z)
1> dllmain.obj:错误LNK2001:未解析的外部符号
public virtual void __thiscall FEMaterial :: Serialize( class DumpFile &) (?Serialize @ FEMaterial @@ UAEXAAVDumpFile @@@ Z)
1> dllmain.obj :错误LNK2001:未解析的外部符号
public : virtual bool __thiscall FEElasticMaterial :: SetAttribute( char const *, char const *) (?SetAttribute @ FEElasticMaterial @@ UAE_NPBD0 @ Z)
1> dllmain.obj:error LNK2001:未解析的外部符号
public virtual int __thiscall FEMaterial :: Properties( void (?Properties @ FEMaterial @@ UAEHXZ)
1> dllmain.obj:错误LNK2001:未解析的外部符号
public :< span class =code-keyword> virtual
class FECoreBase * __thiscall FEMaterial :: GetP roperty( int (?GetProperty @ FEMaterial @@ UAEPAVFECoreBase @@ H @ Z)
1> dllmain.obj:错误LNK2001:未解析的外部符号
public virtual int __thiscall FEMaterial :: FindPropertyIndex( char const *) (?FindPropertyIndex @ FEMaterial @@ UAEHPBD @ Z)
1> dllmain.obj:错误LNK2001:未解析的外部符号
public virtual bool __thiscall FEMaterial :: SetProperty( int class FECoreBase *) (?SetProperty @ FEMaterial @@ UAE_NHPAVFEC oreBase @@@ Z)
1> dllmain.obj:错误LNK2001:未解析的外部符号
public 虚拟 double __thiscall FESolidMaterial :: Density( void (?Density @ FESolidMaterial @@ UAENXZ)
1> dllmain.obj:错误LNK2001:未解析的外部符号
public virtual void __thiscall FEElasticMaterial :: SetLocalCoordinateSystem( class FEElement&, int class FEMaterialPoint&) (?SetLocalCoordinateSystem @ FEElasticMaterial @@ UAEXAAVFEElement @@ HAAVFEMaterialPoint @@@ Z)
1> dllmain.obj:错误LNK2001:未解析的外部符号
public virtual double __thiscall FEElasticMaterial :: StrainEnergyDensity( class FEMaterialPoint&) (?StrainEnergyDensity @ FEElasticMaterial @@ UAENAAVFEMaterialPoint @@@ Z)
1> dllmain.obj:错误LNK2019:未解析的外部符号
public :__ thishisall FEElasticMaterialPoint :: FEElasticMaterialPoint( void ( ?? 0FEElasticMaterialPoint @@ QAE @ XZ)在函数 public virtual class FEMaterialPoint * __thiscall FEElasticMaterial :: CreateMaterialPointData( void (?CreateMaterialPointData @ FEElasticMaterial @@ UAEPAVFEMaterialPoint @@ XZ)
1> dllmain.obj:错误LNK2019:未解析的外部符号
public virtual __thiscall FEElasticMaterial ::〜FEElasticMaterial( void (?? 1FEElasticMaterial @@ UAE @ XZ)在函数 public <中引用/ span>: virtual __thiscall FENeoHookeanPI ::〜FENeoHookeanPI( void (?? 1FENeoHookeanPI @@ UAE @ XZ)
1> FENeoHookeanPI.obj:错误LNK2019:未解析的外部符号
protected void __thiscall FEParamContainer :: AddParameter( void *,枚举 FEParamType, int class RANGE, char const *) (?AddParameter @ FEParamContainer @@ IAEXPAXW4FEParamType @@ HVRANGE @@ PBD @ Z)在函数 protected 中引用: virtual < span class =code-keyword> void
__thiscall FENeoHookeanPI :: BuildParamList( void (?BuildParamList @ FENeoHookeanPI @@ MAEXXZ)
1> FENeoHookeanPI.obj:错误LNK2019:未解析的外部符号
protected virtual void __thiscall FESolidMaterial :: BuildParamList( void (?BuildParamList @ FESolidMaterial @@ MAEXXZ)在函数 protected 中引用: virtual void __thiscall FENeoHookeanPI :: BuildParamList( void (?BuildParamList @ FENeoHookeanPI @@ MAEXXZ)
1> FENeoHookeanPI.obj:错误LNK2019:未解析的外部符号
public virtual void __thiscall FEElasticMaterial :: Init( void (?Init @ FEElasticMaterial @@ UAEXXZ)在函数中引用 public virtual void __thiscall FENeoHookeanPI :: Init( void (?Init @ FENeoHookeanPI @@ UAEXXZ)
1> FENeoHookeanPI.obj:错误LNK2019:未解析的外部符号
public class mat3ds __thiscall FEElasticMaterialPoint :: LeftCauchyGreen( void (?LeftCauchyGreen @ FEElasticMaterialPoint @@ QAE?AVmat3ds @@ XZ)在函数 <中引用span class =code-keyword> public : virtual class mat3ds __thiscall FENeoHookeanPI ::压力( class FEMaterialPoint&) (?Stress @ FENeoHookeanPI @@ UAE?AVmat3ds @@ AAVFEMaterialPoint @@@ Z)
1> C:\ Users\pars\Desktop\example\FEneohookean\Debug\FEneohookean.dll:致命错误LNK1120: 21个未解决的外部因素
1 >
1> Build FAILED。
1>
>
FERegisterClass_T@VFENeoHookeanPI@@@@QAE@IPBD@Z) 1>dllmain.obj : error LNK2019: unresolved external symbol "public: __thiscall FEElasticMaterial::FEElasticMaterial(class FEModel *)" (??0FEElasticMaterial@@QAE@PAVFEModel@@@Z) referenced in function "public: __thiscall FENeoHookeanPI::FENeoHookeanPI(class FEModel *)" (??0FENeoHookeanPI@@QAE@PAVFEModel@@@Z) 1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual class FEParam * __thiscall FEMaterial::GetParameter(class ParamString const &)" (?GetParameter@FEMaterial@@UAEPAVFEParam@@ABVParamString@@@Z) 1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall FEMaterial::Serialize(class DumpFile &)" (?Serialize@FEMaterial@@UAEXAAVDumpFile@@@Z) 1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall FEElasticMaterial::SetAttribute(char const *,char const *)" (?SetAttribute@FEElasticMaterial@@UAE_NPBD0@Z) 1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall FEMaterial::Properties(void)" (?Properties@FEMaterial@@UAEHXZ) 1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual class FECoreBase * __thiscall FEMaterial::GetProperty(int)" (?GetProperty@FEMaterial@@UAEPAVFECoreBase@@H@Z) 1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall FEMaterial::FindPropertyIndex(char const *)" (?FindPropertyIndex@FEMaterial@@UAEHPBD@Z) 1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall FEMaterial::SetProperty(int,class FECoreBase *)" (?SetProperty@FEMaterial@@UAE_NHPAVFECoreBase@@@Z) 1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall FESolidMaterial::Density(void)" (?Density@FESolidMaterial@@UAENXZ) 1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall FEElasticMaterial::SetLocalCoordinateSystem(class FEElement &,int,class FEMaterialPoint &)" (?SetLocalCoordinateSystem@FEElasticMaterial@@UAEXAAVFEElement@@HAAVFEMaterialPoint@@@Z) 1>dllmain.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall FEElasticMaterial::StrainEnergyDensity(class FEMaterialPoint &)" (?StrainEnergyDensity@FEElasticMaterial@@UAENAAVFEMaterialPoint@@@Z) 1>dllmain.obj : error LNK2019: unresolved external symbol "public: __thiscall FEElasticMaterialPoint::FEElasticMaterialPoint(void)" (??0FEElasticMaterialPoint@@QAE@XZ) referenced in function "public: virtual class FEMaterialPoint * __thiscall FEElasticMaterial::CreateMaterialPointData(void)" (?CreateMaterialPointData@FEElasticMaterial@@UAEPAVFEMaterialPoint@@XZ) 1>dllmain.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall FEElasticMaterial::~FEElasticMaterial(void)" (??1FEElasticMaterial@@UAE@XZ) referenced in function "public: virtual __thiscall FENeoHookeanPI::~FENeoHookeanPI(void)" (??1FENeoHookeanPI@@UAE@XZ) 1>FENeoHookeanPI.obj : error LNK2019: unresolved external symbol "protected: void __thiscall FEParamContainer::AddParameter(void *,enum FEParamType,int,class RANGE,char const *)" (?AddParameter@FEParamContainer@@IAEXPAXW4FEParamType@@HVRANGE@@PBD@Z) referenced in function "protected: virtual void __thiscall FENeoHookeanPI::BuildParamList(void)" (?BuildParamList@FENeoHookeanPI@@MAEXXZ) 1>FENeoHookeanPI.obj : error LNK2019: unresolved external symbol "protected: virtual void __thiscall FESolidMaterial::BuildParamList(void)" (?BuildParamList@FESolidMaterial@@MAEXXZ) referenced in function "protected: virtual void __thiscall FENeoHookeanPI::BuildParamList(void)" (?BuildParamList@FENeoHookeanPI@@MAEXXZ) 1>FENeoHookeanPI.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall FEElasticMaterial::Init(void)" (?Init@FEElasticMaterial@@UAEXXZ) referenced in function "public: virtual void __thiscall FENeoHookeanPI::Init(void)" (?Init@FENeoHookeanPI@@UAEXXZ) 1>FENeoHookeanPI.obj : error LNK2019: unresolved external symbol "public: class mat3ds __thiscall FEElasticMaterialPoint::LeftCauchyGreen(void)" (?LeftCauchyGreen@FEElasticMaterialPoint@@QAE?AVmat3ds@@XZ) referenced in function "public: virtual class mat3ds __thiscall FENeoHookeanPI::Stress(class FEMaterialPoint &)" (?Stress@FENeoHookeanPI@@UAE?AVmat3ds@@AAVFEMaterialPoint@@@Z) 1>C:\Users\pars\Desktop\example\FEneohookean\Debug\FEneohookean.dll : fatal error LNK1120: 21 unresolved externals 1> 1>Build FAILED. 1>">



谢谢,

Faezeh



我尝试了什么:



我查了一下目录和图书馆,我也问过人


Thanks,
Faezeh

What I have tried:

I have checked the directories and libraries and I have also asked people


这篇关于如何解决“dllmain.obj:错误LNK2019:未解析的外部符号”public&quot;制作DLL项目时出错?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆