Click here to Skip to main content
15,886,095 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
1>
::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>">

Thanks,
Faezeh

What I have tried:

I have checked the directories and libraries and I have also asked people
Posted
Updated 5-Apr-16 0:36am
Comments
Richard MacCutchan 5-Apr-16 3:51am    
Have you declared these entry points as exported correctly?

hi,
as already pointed out by Richard in his comments, the functins from the dll have not been exported. Another appication can consume the functions in the dll only after the library(dynamic linking library) has properly exposed them. Basically the export table of the dll should contain the name of the exposed functions .
MSDN is the first place for anything Microsoft.

How to export functions from dll :
Exporting from a DLL[^]

a helpful tutorial : DLL How to Write[^]

a slightly advanced article on CodeProject[^]

You will get plenty of information on the internet; google is your friend.

hope this helps.
 
Share this answer
 
Comments
Serkan Onat 5-Apr-16 6:23am    
as you can see at the error log
the problem is not exporting from the dll !

it is related with importing to his dll
it is not that simple , you need to add all reference paths and include files
you must also add import lib directives ,adding lib folder reference makes no sense unless you add necessary libs
to your project

some helper classes are not implemented as lib so you must add their header files to your project

you would better have a look at this 3ds Max SDK Programmer's Guide and Reference[^]

especially the section Creating a Plug-in Project explains everything you need to start your plugin development
 
Share this answer
 
Comments
Member 12437140 6-Apr-16 7:38am    
Thanks for your help
But I can't open this page. Is it open access?
Serkan Onat 6-Apr-16 14:22pm    
the link i provided works well ,it is an online API documentation
if you still can not open then try google with '3ds Max SDK Reference'

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900