Page 1 of 1

Compile and install user-defined plugin

Posted: Fri Oct 12, 2018 7:00 am
by gscaccuto
Hi,
I was trying to create an user-defined plugin with some C++ classes which extend Muscle Superclass. I followed instructions from documentation paragraph "Creating plugins" but when I compile the build project I got this error:

Code: Select all

Errore	LNK2019	riferimento al simbolo esterno "__declspec(dllimport) public: __cdecl OpenSim::Millard2012EquilibriumMuscle::Millard2012EquilibriumMuscle(class OpenSim::Millard2012EquilibriumMuscle &&)" (__imp_??0Millard2012EquilibriumMuscle@OpenSim@@QEAA@$$QEAV01@@Z) non risolto nella funzione "public: __cdecl OpenSim::Millard12EqMuscleWithAfferents::Millard12EqMuscleWithAfferents(class OpenSim::Millard12EqMuscleWithAfferents &&)" (??0Millard12EqMuscleWithAfferents@OpenSim@@QEAA@$$QEAV01@@Z)	Libraries - osimMillard12EqMuscleWithAfferentsPlugin	C:\Users\utente\Desktop\build\Lin02GolgiTendonOrgan.obj	1	
Errore	LNK2001	simbolo esterno "__declspec(dllimport) public: __cdecl OpenSim::Millard2012EquilibriumMuscle::Millard2012EquilibriumMuscle(class OpenSim::Millard2012EquilibriumMuscle &&)" (__imp_??0Millard2012EquilibriumMuscle@OpenSim@@QEAA@$$QEAV01@@Z) non risolto	Libraries - osimMillard12EqMuscleWithAfferentsPlugin	C:\Users\utente\Desktop\build\Mileusnic06Spindle.obj	1	
Errore	LNK2001	simbolo esterno "__declspec(dllimport) public: __cdecl OpenSim::Millard2012EquilibriumMuscle::Millard2012EquilibriumMuscle(class OpenSim::Millard2012EquilibriumMuscle &&)" (__imp_??0Millard2012EquilibriumMuscle@OpenSim@@QEAA@$$QEAV01@@Z) non risolto	Libraries - osimMillard12EqMuscleWithAfferentsPlugin	C:\Users\utente\Desktop\build\Millard12EqMuscleWithAfferents.obj	1	
Errore	LNK2001	simbolo esterno "__declspec(dllimport) public: __cdecl OpenSim::Millard2012EquilibriumMuscle::Millard2012EquilibriumMuscle(class OpenSim::Millard2012EquilibriumMuscle &&)" (__imp_??0Millard2012EquilibriumMuscle@OpenSim@@QEAA@$$QEAV01@@Z) non risolto	Libraries - osimMillard12EqMuscleWithAfferentsPlugin	C:\Users\utente\Desktop\build\RegisterTypes_osimPlugin.obj	1	
Errore	LNK2019	riferimento al simbolo esterno "__declspec(dllimport) public: class OpenSim::Millard2012EquilibriumMuscle & __cdecl OpenSim::Millard2012EquilibriumMuscle::operator=(class OpenSim::Millard2012EquilibriumMuscle &&)" (__imp_??4Millard2012EquilibriumMuscle@OpenSim@@QEAAAEAV01@$$QEAV01@@Z) non risolto nella funzione "public: class OpenSim::Millard12EqMuscleWithAfferents & __cdecl OpenSim::Millard12EqMuscleWithAfferents::operator=(class OpenSim::Millard12EqMuscleWithAfferents &&)" (??4Millard12EqMuscleWithAfferents@OpenSim@@QEAAAEAV01@$$QEAV01@@Z)	Libraries - osimMillard12EqMuscleWithAfferentsPlugin	C:\Users\utente\Desktop\build\Lin02GolgiTendonOrgan.obj	1	
Errore	LNK2001	simbolo esterno "__declspec(dllimport) public: class OpenSim::Millard2012EquilibriumMuscle & __cdecl OpenSim::Millard2012EquilibriumMuscle::operator=(class OpenSim::Millard2012EquilibriumMuscle &&)" (__imp_??4Millard2012EquilibriumMuscle@OpenSim@@QEAAAEAV01@$$QEAV01@@Z) non risolto	Libraries - osimMillard12EqMuscleWithAfferentsPlugin	C:\Users\utente\Desktop\build\Mileusnic06Spindle.obj	1	
Errore	LNK2001	simbolo esterno "__declspec(dllimport) public: class OpenSim::Millard2012EquilibriumMuscle & __cdecl OpenSim::Millard2012EquilibriumMuscle::operator=(class OpenSim::Millard2012EquilibriumMuscle &&)" (__imp_??4Millard2012EquilibriumMuscle@OpenSim@@QEAAAEAV01@$$QEAV01@@Z) non risolto	Libraries - osimMillard12EqMuscleWithAfferentsPlugin	C:\Users\utente\Desktop\build\Millard12EqMuscleWithAfferents.obj	1	
Errore	LNK2001	simbolo esterno "__declspec(dllimport) public: class OpenSim::Millard2012EquilibriumMuscle & __cdecl OpenSim::Millard2012EquilibriumMuscle::operator=(class OpenSim::Millard2012EquilibriumMuscle &&)" (__imp_??4Millard2012EquilibriumMuscle@OpenSim@@QEAAAEAV01@$$QEAV01@@Z) non risolto	Libraries - osimMillard12EqMuscleWithAfferentsPlugin	C:\Users\utente\Desktop\build\RegisterTypes_osimPlugin.obj	1	
Errore	LNK2019	riferimento al simbolo esterno __imp_RegisterTypes_osimTools non risolto nella funzione "void __cdecl `dynamic initializer for 'instantiator''(void)" (??__Einstantiator@@YAXXZ)	Libraries - osimMillard12EqMuscleWithAfferentsPlugin	C:\Users\utente\Desktop\build\Lin02GolgiTendonOrgan.obj	1	
Errore	LNK2001	simbolo esterno __imp_RegisterTypes_osimTools non risolto	Libraries - osimMillard12EqMuscleWithAfferentsPlugin	C:\Users\utente\Desktop\build\Mileusnic06Spindle.obj	1	
Errore	LNK2001	simbolo esterno __imp_RegisterTypes_osimTools non risolto	Libraries - osimMillard12EqMuscleWithAfferentsPlugin	C:\Users\utente\Desktop\build\Millard12EqMuscleWithAfferents.obj	1	
Errore	LNK2001	simbolo esterno __imp_RegisterTypes_osimTools non risolto	Libraries - osimMillard12EqMuscleWithAfferentsPlugin	C:\Users\utente\Desktop\build\RegisterTypes_osimPlugin.obj	1	
Errore	LNK1120	3 esterni non risolti	Libraries - osimMillard12EqMuscleWithAfferentsPlugin	C:\Users\utente\Desktop\build\Release\osimMillard12EqMuscleWithAfferentsPlugin.dll	1	
Any suggestion? :\

Re: Compile and install user-defined plugin

Posted: Fri Oct 12, 2018 3:20 pm
by tkuchida
You may want to look at the following simtk.org project, which provides code for building a muscle plug-in: "Developing a fatigable muscle model", https://simtk.org/projects/fatigablemuscle.

Re: Compile and install user-defined plugin

Posted: Thu Oct 18, 2018 4:21 am
by gscaccuto
Ok, It seems it works with Opensim Core Source Library instead of Release version Library. :\