I'm trying to build ACE and TAO environment but got many errors.
The procedure what I did to install ACE and TAO is:
#definenter code heree ACE_HAS_WINNT4 1
#define ACE_HAS_STANDARD_CPP_LIBRARY 1
#define ACE_HAS_MFC 1
#define THR_USE_AFX 1
#define ACE_USES_STATIC_MFC 1
#define ACE_AS_STATIC_LIBS 1
#define ACE_NO_INLINE
#include "ace/config-win32.h"
In PATH system variable, add value: C:\Program Files\Microsoft Visual Studio 10.0\VC\bin;C:\ACE_wrappers\bin;C:\ACE_wrappers\lib;C:\ACE_wrappers\TAO\bin; so the value is: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;%USERPROFILE%.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft Visual Studio 10.0\VC\bin;C:\ACE_wrappers\bin;C:\ACE_wrappers\lib;C:\ACE_wrappers\TAO\bin;
Start Visual Stiduo 2010
In Configuration Properties -> VC++ Directories -> Library Directories add C:\ACE_wrappers\ace C:\ACE_wrappers\TAO\tao C:\ACE_wrappers\TAO\orbsvcs\orbsvcs
Select every project and check whether its Configuration Properties -> General -> Configuration Type is Dynamic Library (.dll), if it is, then change to Static library (.lib) But if it is Application(.exe) or Utility, then I do not change. Like the Scheduling_Service project which has error during build.
After a long time, most projects are built successfully. The Scheduling_Service, Time_Service_Clerk, NT_Notify_Service, Naming_Service (, and maybe there are few other projects) have errors (error LNK2001: unresolved external symbol "__declspec(dllimport) public:......).
1>Scheduling_Service.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall TAO_ORB_Manager::~TAO_ORB_Manager(void)" (__imp_??1TAO_ORB_Manager@@QAE@XZ) referenced in function __unwindfunclet$??0TAO_Scheduling_Service@@QAE@XZ$0 1>Scheduling_Service.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall TAO_ORB_Manager::TAO_ORB_Manager(class CORBA::ORB *,class PortableServer::POA *,class PortableServer::POAManager *)" (__imp_??0TAO_ORB_Manager@@QAE@PAVORB@CORBA@@PAVPOA@PortableServer@@PAVPOAManager@4@@Z) referenced in function "public: __thiscall TAO_Scheduling_Service::TAO_Scheduling_Service(void)" (??0TAO_Scheduling_Service@@QAE@XZ) 1>Scheduling_Service.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CosNaming::Name::~Name(void)" (__imp_??1Name@CosNaming@@UAE@XZ) referenced in function "public: int __thiscall TAO_Scheduling_Service::init(int,char * * const)" (?init@TAO_Scheduling_Service@@QAEHHQAPAD@Z) 1>TAO_RTSchedd.lib(Scheduler_Factory.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CosNaming::Name::~Name(void)" (__imp_??1Name@CosNaming@@UAE@XZ) 1>Scheduling_Service.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: struct CosNaming::NameComponent & __thiscall TAO::unbounded_value_sequence::operator[](unsigned int)" (__imp_??A?$unbounded_value_sequence@UNameComponent@CosNaming@@@TAO@@QAEAAUNameComponent@CosNaming@@I@Z) referenced in function "public: int __thiscall TAO_Scheduling_Service::init(int,char * * const)" (?init@TAO_Scheduling_Service@@QAEHHQAPAD@Z) 1>TAO_RTSchedd.lib(Scheduler_Factory.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: struct CosNaming::NameComponent & __thiscall TAO::unbounded_value_sequence::operator[](unsigned int)" (__imp_??A?$unbounded_value_sequence@UNameComponent@CosNaming@@@TAO@@QAEAAUNameComponent@CosNaming@@I@Z)
Does anyone know this problem? Thank you very much.
You shouldn't use #define ACE_AS_STATIC_LIBS 1
unless you are using a Visual Studio project which are generated for static usage. At the moment you want to do a static build you have to regenerate the Visual Studio projects with MPC