我正在尝试构建ACE和TAO环境,但却遇到了很多错误。
我安装ACE和TAO的过程是:
#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"
在PATH系统变量中,添加值:C:\ Program Files \ Microsoft Visual Studio 10.0 \ VC \ bin; C:\ ACE_wrappers \ bin; C:\ ACE_wrappers \ lib; C:\ ACE_wrappers \ TAO \仓; 所以价值是: %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;
启动Visual Stiduo 2010
在配置属性中 - > VC ++目录 - >图书馆目录添加 C:\ ACE_wrappers \ ACE C:\ ACE_wrappers \ TAO \涛 C:\ ACE_wrappers \ TAO \ orbsvcs \ orbsvcs
选择每个项目并检查其配置属性 - >一般 - >配置类型是动态库(.dll),如果是,则更改为静态库(.lib) 但如果是Application(.exe)或Utility,那我就不会改变。就像Scheduling_Service项目在构建期间出错一样。
经过很长一段时间,大多数项目都成功建成。 Scheduling_Service,Time_Service_Clerk,NT_Notify_Service,Naming_Service(可能还有其他一些项目)有错误(错误LNK2001:未解析的外部符号" __ declspec(dllimport)public:......)。
1> Scheduling_Service.obj:错误LNK2019:未解析的外部符号" __ declspec(dllimport)public:__ thishisall TAO_ORB_Manager :: ~TAO_ORB_Manager(void)" (__imp _ ?? 1TAO_ORB_Manager @@ QAE @ XZ)函数__unwindfunclet $ ?? 0TAO_Scheduling_Service @@ QAE @XZ $ 0 1> Scheduling_Service.obj:错误LNK2019:未解析的外部符号" __ declspec(dllimport)public:__ thishisall TAO_ORB_Manager :: TAO_ORB_Manager(类CORBA :: ORB *,类PortableServer :: POA *,类PortableServer :: POAManager *)& #34; (__imp _ ?? 0TAO_ORB_Manager @@ QAE @ PAVORB @ CORBA @@ PAVPOA @ PortableServer @@ PAVPOAManager @ 4 @@ Z)在函数" public中引用:__thiscall TAO_Scheduling_Service :: TAO_Scheduling_Service(void)" (?? 0TAO_Scheduling_Service @@ @ QAE XZ) 1> Scheduling_Service.obj:错误LNK2019:未解析的外部符号" __ declspec(dllimport)public:virtual __thiscall CosNaming :: Name ::〜Name(void)" (__imp _ ?? 1Name @ CosNaming @@ UAE @ XZ)在函数&#34中引用; public:int __thiscall TAO_Scheduling_Service :: init(int,char * * const)" (?INIT @ TAO_Scheduling_Service @@ QAEHHQAPAD @ Z) 1> TAO_RTSchedd.lib(Scheduler_Factory.obj):错误LNK2001:未解析的外部符号" __ declspec(dllimport)public:virtual __thiscall CosNaming :: Name ::〜Name(void)" (__imp _ ?? 1Name @ @@的CosNaming UAE @ XZ) 1> Scheduling_Service.obj:错误LNK2019:未解析的外部符号" __ 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)在函数&#34中引用; public:int __thiscall TAO_Scheduling_Service :: init(int,char * * const) " (?INIT @ TAO_Scheduling_Service @@ QAEHHQAPAD @ Z) 1> TAO_RTSchedd.lib(Scheduler_Factory.obj):错误LNK2001:未解析的外部符号" __ 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)
有谁知道这个问题?非常感谢你。
答案 0 :(得分:1)
除非您使用为静态用法生成的Visual Studio项目,否则不应使用#define ACE_AS_STATIC_LIBS 1
。在您想要进行静态构建的那一刻,您必须使用MPC重新生成Visual Studio项目