Trying to incorporate my custom material. I am getting the following error during compiling:
openSees error LNK2019: unresolved external symbol "int __cdecl TclCommand_MYMaterial(void *,struct Tcl_Interp *,int,char const * *,class TclModelBuilder *)" (?TclCommand_MYMaterial@@YAHPAXPAUTcl_Interp@@HPAPBDPAVTclModelBuilder@@@Z) referenced in function "int __cdecl TclModelBuilderUniaxialMaterialCommand(void *,struct Tcl_Interp *,int,char const * *,class TclModelBuilder *,class Domain *)" (?TclModelBuilderUniaxialMaterialCommand@@YAHPAXPAUTcl_Interp@@HPAPBDPAVTclModelBuilder@@PAVDomain@@@Z)
where "MYMatrerial" is the name of the new material of concern. Probably did something wrong when making changes on the OpenSees Interpreter. Here were my steps:
1) assign material tag number (SRC--> classTags.h)
2) Under SRC-->material-->TclModelBuilderUniaxialMaterialCommand.cpp
a) added the line of code:
"#include <MYMaterial.h>"
b) added the line of code:
int TclCommand_MYMaterial(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv, TclModelBuilder *theTclBuilder);
c) added the line of code:
else if (strcmp(argv[1], "MYMaterial") == 0) { return TclCommand_MYMaterial(clientData,interp,argc,argv,theTclBuilder); }
3) Created the "MYMaterial.cpp" where int TclCommand_MYMaterial(.....) is, and placed it under SRC-->material-->uniaxial
Is the compile error regarding the above steps? Am I missing any additional tasks that need to be completed? Any help is much appreciated.
Thanks.
new material
Moderators: silvia, selimgunay, Moderators