The updated code eliminated the error. However, there are still linking errors. I noticed the earlier discussion at
http://gmat.ed-pages.com/forum/viewtopic.php?f=2&t=43552#p45136, and the error report from my build looks almost identical. From the earlier discussion, adding _DYNAMICLINK and PRINT_EXPORTS to the list of preprocessor definitions resolved the issue. However, even though these two definitions are included in my project, I still have the following warnings/errors:
1> ConsolePrint.cpp
1>..\..\src\command\ConsolePrint.cpp(40): warning C4273: 'ConsolePrint::ConsolePrint' : inconsistent dll linkage
1> ..\..\src\command\ConsolePrint.hpp(32) : see previous definition of '{ctor}'
1>..\..\src\command\ConsolePrint.cpp(54): warning C4273: 'ConsolePrint::~ConsolePrint' : inconsistent dll linkage
1> ..\..\src\command\ConsolePrint.hpp(33) : see previous definition of '{dtor}'
1>..\..\src\command\ConsolePrint.cpp(67): warning C4273: 'ConsolePrint::ConsolePrint' : inconsistent dll linkage
1> ..\..\src\command\ConsolePrint.hpp(34) : see previous definition of '{ctor}'
1>..\..\src\command\ConsolePrint.cpp(85): warning C4273: 'ConsolePrint::operator =' : inconsistent dll linkage
1> ..\..\src\command\ConsolePrint.hpp(35) : see previous definition of '='
1>..\..\src\command\ConsolePrint.cpp(103): warning C4273: 'ConsolePrint::Clone' : inconsistent dll linkage
1> ..\..\src\command\ConsolePrint.hpp(37) : see previous definition of 'Clone'
1>..\..\src\command\ConsolePrint.cpp(130): warning C4273: 'ConsolePrint::InterpretAction' : inconsistent dll linkage
1> ..\..\src\command\ConsolePrint.hpp(38) : see previous definition of 'InterpretAction'
1>..\..\src\command\ConsolePrint.cpp(167): warning C4273: 'ConsolePrint::Initialize' : inconsistent dll linkage
1> ..\..\src\command\ConsolePrint.hpp(42) : see previous definition of 'Initialize'
1>..\..\src\command\ConsolePrint.cpp(220): warning C4273: 'ConsolePrint::Execute' : inconsistent dll linkage
1> ..\..\src\command\ConsolePrint.hpp(43) : see previous definition of 'Execute'
1>..\..\src\command\ConsolePrint.cpp(243): warning C4273: 'ConsolePrint::RunComplete' : inconsistent dll linkage
1> ..\..\src\command\ConsolePrint.hpp(44) : see previous definition of 'RunComplete'
1>..\..\src\command\ConsolePrint.cpp(257): warning C4273: 'ConsolePrint::BuildReferences' : inconsistent dll linkage
1> ..\..\src\command\ConsolePrint.hpp(59) : see previous definition of 'BuildReferences'
1>..\..\src\command\ConsolePrint.cpp(289): warning C4273: 'ConsolePrint::GetData' : inconsistent dll linkage
1> ..\..\src\command\ConsolePrint.hpp(60) : see previous definition of 'GetData'
1>
1> SampleFactory.cpp
1>..\..\src\factory\SampleFactory.cpp(35): warning C4273: 'SampleFactory::SampleFactory' : inconsistent dll linkage
1> ..\..\src\factory\SampleFactory.hpp(41) : see previous definition of '{ctor}'
1>..\..\src\factory\SampleFactory.cpp(55): warning C4273: 'SampleFactory::~SampleFactory' : inconsistent dll linkage
1> ..\..\src\factory\SampleFactory.hpp(42) : see previous definition of '{dtor}'
1>..\..\src\factory\SampleFactory.cpp(68): warning C4273: 'SampleFactory::SampleFactory' : inconsistent dll linkage
1> ..\..\src\factory\SampleFactory.hpp(43) : see previous definition of '{ctor}'
1>..\..\src\factory\SampleFactory.cpp(93): warning C4273: 'SampleFactory::operator =' : inconsistent dll linkage
1> ..\..\src\factory\SampleFactory.hpp(44) : see previous definition of '='
1>..\..\src\factory\SampleFactory.cpp(128): warning C4273: 'SampleFactory::CreateCommand' : inconsistent dll linkage
1> ..\..\src\factory\SampleFactory.hpp(78) : see previous definition of 'CreateCommand'
1>
1> GmatPluginFunctions.cpp
1>..\..\src\plugin\GmatPluginFunctions.cpp(39): warning C4273: 'GetFactoryCount' : inconsistent dll linkage
1> ..\..\src\plugin\GmatPluginFunctions.hpp(28) : see previous definition of 'GetFactoryCount'
1>..\..\src\plugin\GmatPluginFunctions.cpp(56): warning C4273: 'GetFactoryPointer' : inconsistent dll linkage
1> ..\..\src\plugin\GmatPluginFunctions.hpp(29) : see previous definition of 'GetFactoryPointer'
1>..\..\src\plugin\GmatPluginFunctions.cpp(85): warning C4273: 'SetMessageReceiver' : inconsistent dll linkage
1> ..\..\src\plugin\GmatPluginFunctions.hpp(30) : see previous definition of 'SetMessageReceiver'
1>
1> Creating library ..\..\..\..\GmatDevelopment\application\plugins\libConsolePrint.lib and object ..\..\..\..\GmatDevelopment\application\plugins\libConsolePrint.exp
1>
1>ConsolePrint.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) const ConsolePrint::`vftable'" (__imp_??_7ConsolePrint@@6B@)
1>ConsolePrint.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __thiscall ConsolePrint::RenameRefObject(enum Gmat::ObjectType,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?RenameRefObject@ConsolePrint@@UAE_NW4ObjectType@Gmat@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z)
1>ConsolePrint.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __thiscall ConsolePrint::HasLocalClones(void)" (__imp_?HasLocalClones@ConsolePrint@@UAE_NXZ)
1>SampleFactory.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) const SampleFactory::`vftable'" (__imp_??_7SampleFactory@@6B@)