封闭源代码库包括提升发行 [英] closed source library includes boost distribution

查看:119
本文介绍了封闭源代码库包括提升发行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是封闭源代码库(由ACTIV金融)与他们的API包括升压分布,既有一些提振头文件和Boost库文件。

I'm using a closed source library (by Activ financial) that includes with their API a boost distribution, both some boost header files and boost library files.

我也用升压在我现有的codeBase的,我需要使用ACTIV从现有code。

I also use Boost in my existing codebase, and I need to use Activ from my existing code.

的几点


  • 我可以概括了我的ACTIV使用,使整个ACTIV部分达一个类我写的不公开任何ACTIV的头

  • 这种单一的头文件中不使用任何提振什么

  • 在这种方式,我可以保证我的code使用ACTIV的升压HPP文件,而我的code的ACTIV配用我的Boost的HPP文件

我担心进来链接。我怎样才能确保我的ACTIV依赖code链接ACTIV的增强,以及我的其他code链接到我的升压?

My worry comes in linking. How can I ensure that my Activ dependent code links to Activ's Boost, and my other code links to my Boost?

我用G ++现在,也将在VS2008可以这样做。我得到了它在VS2008之前的工作,但我不知道如何一切联系。我想尝试,以确保它的正确。

I'm using g++ now, will also be doing this in VS2008. I got it working in VS2008 before, but I have no idea how everything linked. I want to try to make sure it's done correctly.

有没有办法做到这一点没有在一个动态库进一步封装ACTIV一部分?

Is there a way to do it without further encapsulating the Activ part in a dynamic library?

编辑:

有关之一,我的最终产物总是一个可执行文件。两年,我静态链接到自己的提高。该ACTIV库包括升压对象库的静态和动态的版本,我打算静态链接它。

For one, my final product is always an executable file. For two, I statically link to boost myself. The Activ library includes both static and dynamic versions of Boost object libraries, and I plan to statically link it.

我从来没有通过使用不同版本的提振code之间升压对象。

I never pass Boost objects between code that uses different boost versions.

现在的问题是,我怎么链路上与一个或CPP 的.o 文件中的有一个的库文件对象,然后确保其他的.o 文件链接到的其他的库文件相同的对象?这可能吗?

The question is, how do I link one cpp or .o file to objects in one library file, and then make sure other .o files link to the identical objects in another library file? Is this possible?

推荐答案

图书馆是否动态或静态链接到提升?如果静态链接,图书馆是否暴露了DLL(declspec出口)?

Does the library dynamically or statically link to Boost? If statically linked, does the library expose the symbols in the DLL (declspec export)?

如果库是静态链接和符号不外露,的你不传递任何加速的数据结构(smart_ptr,线程等)来回,你有可能可以安全地使用自己版本的Boost库在您的DLL。

If the library is statically linked and the symbols are not exposed, and you do not pass any Boost data structures (smart_ptr, threads, etc) back and forth, you are likely safe to use your own version of the Boost library in your DLL.

这篇关于封闭源代码库包括提升发行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆