ACE TAO Corba Ubuntu 10.4 对 CORBA::Object::_refcount_value() 的未定义引用

发布于 2024-09-05 19:54:16 字数 1387 浏览 11 评论 0原文

我在获取包管理器中提供的 libTao 附带的示例程序时遇到一些问题。我过去曾在 Windows 上使用过 ace tao,所以已经有一些经验了。

到目前为止,我已经设置了所有环境变量,为“简单客户端”示例创建了一个新项目。我可以很好地编译 .idl 。然后,当我尝试编译客户端时,出现链接器错误...

Building target: CorbaTest
Invoking: GCC C++ Linker
g++ -Xlinker -Map -Xlinker txt.txt -Xlinker --cref -o"CorbaTest" ./src/EchoC.o ./src/EchoS.o ./src/Echo_Client_i.o ./src/Echo_I.o ./src/client.o -lACE -lTAO -lTAO_AnyTypeCode -lTAO_BiDirGIOP -lTAO_CodecFactory -lTAO_CosNaming -lTAO_DynamicAny -lTAO_EndpointPolicy -lTAO_DynamicInterface -lTAO_IFR_Client -lTAO_ImR_Client -lTAO_IORInterceptor -lTAO_IORTable -lTAO_Messaging -lTAO_ObjRefTemplate -lTAO_PI -lTAO_RTCORBA -lTAO_RTPortableServer -lTAO_PortableServer -lTAO_SmartProxies -lTAO_Strategies -lTAO_TypeCodeFactory -lTAO_Utils -lTAO_Valuetype -lTAO_CSD_ThreadPool -lTAO_TC -lTAO_TC_IIOP -lTAO_Compression -lTAO_ZlibCompressor
./src/EchoC.o:(.rodata._ZTV4Echo[vtable for Echo]+0xe0): undefined reference to `CORBA::Object::_refcount_value() const'
collect2: ld returned 1 exit status
make: *** [CorbaTest] Error 1

我无法在网上找到有关 CORBA::OBbject_refcount_value() 的任何内容来为我指明可能缺少的库的方向。我已经包含了这里的所有推荐库 http://www.dre。 vanderbilt.edu/~schmi...libraries.html 仍然得到相同的错误。这是示例代码,应该针对提供的 Tai 发行版进行编译和链接。我缺少什么想法吗?哦,我正在使用 Eclipse,如果它有什么区别的话。

谢谢 :)

I am having a few problems getting the example programs that come with the libTao provided in the package manager. I have used ace tao in the past with windows so have some experience with it already.

So far I have all the environment variables set, created a new projects for the "Simple Client" example. I can compile the .idl fine. When I then try to compile the client I get a linker error ...

Building target: CorbaTest
Invoking: GCC C++ Linker
g++ -Xlinker -Map -Xlinker txt.txt -Xlinker --cref -o"CorbaTest" ./src/EchoC.o ./src/EchoS.o ./src/Echo_Client_i.o ./src/Echo_I.o ./src/client.o -lACE -lTAO -lTAO_AnyTypeCode -lTAO_BiDirGIOP -lTAO_CodecFactory -lTAO_CosNaming -lTAO_DynamicAny -lTAO_EndpointPolicy -lTAO_DynamicInterface -lTAO_IFR_Client -lTAO_ImR_Client -lTAO_IORInterceptor -lTAO_IORTable -lTAO_Messaging -lTAO_ObjRefTemplate -lTAO_PI -lTAO_RTCORBA -lTAO_RTPortableServer -lTAO_PortableServer -lTAO_SmartProxies -lTAO_Strategies -lTAO_TypeCodeFactory -lTAO_Utils -lTAO_Valuetype -lTAO_CSD_ThreadPool -lTAO_TC -lTAO_TC_IIOP -lTAO_Compression -lTAO_ZlibCompressor
./src/EchoC.o:(.rodata._ZTV4Echo[vtable for Echo]+0xe0): undefined reference to `CORBA::Object::_refcount_value() const'
collect2: ld returned 1 exit status
make: *** [CorbaTest] Error 1

I cannot find anything online with regards to CORBA::OBbject_refcount_value() to point me in the direction of a library I might be missing. I have included all the recomended libraries from here http://www.dre.vanderbilt.edu/~schmi...libraries.html and still get the same error. This is example code that should compile and link against the supplied Tao distribution. Any ideas what I am missing? Oh and im using eclipse if it makes any difference.

Thanks :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

桃气十足 2024-09-12 19:54:16

您的链接器可能在库顺序方面遇到问题。首先是 libACE,然后是 libTAO,等等。 对于某些链接器,如果 libA 依赖于 libB,那么 libA 应该在链接中的 libB 之前(即左侧)。因此,由于 TAO 依赖于 ACE,因此尝试将 libTAO 放在 libACE 的左侧。事实上,您可以尝试颠倒链接中库的顺序,因为您列出的所有 libTAO_* 库都依赖于 libTAO。

更好的是,您可能想查看 ACE+TAO 附带的免费 MPC 工具。它可以为大多数平台生成无故障的 ACE+TAO Makefile。它位于 $ACE_ROOT/bin 目录中并且有详细的文档记录。有关信息,请参阅 http://www.ociweb.com/products/mpc。我不知道它与 Eclipse 的配合效果如何,但可能值得一试。也许您可以在 Eclipse 中编辑代码并从命令行进行编译。

It's possible your linker is having trouble with the library order. You've got libACE first, followed by libTAO, etc. With some linkers if libA depends on libB, then libA should some before (i.e., to the left of) libB in the link. So, since TAO depends on ACE, try putting libTAO to the left of libACE. In fact, you might try reversing the order of the libraries in your link, since all of the libTAO_* libraries you have listed depend on libTAO.

Better yet, you might want to check out the free MPC tool that comes with ACE+TAO. It can generate trouble-free ACE+TAO Makefiles for most platforms. It lives in the $ACE_ROOT/bin directory and is well documented. See http://www.ociweb.com/products/mpc for info. I don't know how well it will work with Eclipse, but it might be worth a shot. Maybe you can edit code in Eclipse and compile from the command line.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文