English 中文(简体)
我如何管理制作静态平衡和破碎的图书馆建设项目?
原标题:How can I manage building library projects that produce both a static lib and a dll?

我用大约50个项目找到了一个大型视力室解决方案。 设有法定假日、法定假日、假日和释放的组合。 一些图书馆需要双轨和静态校准形式。 为了实现这些目标,我们以不同的组合重建解决办法。 配置管理员窗口用于确定哪些项目需要建造,以防气味、静态平衡、动态磨损或两者兼有。

这样做可以简单地加以管理,它只是想不得不多次建立解决办法并按正确的顺序选择组合。 法定版本需要在非法定版本之前建造。

我不禁要问的是,如果我为产生静态的平衡和动力 d而需要的项目,我是否创立了两个项目,那么,管理起来可能更简单。 例如:

  • CoreLib
  • CoreDll

我可以让这两个项目都参考所有相同的档案,并两次建立,或者说我很想知道,是否有可能建设核心语言,然后获得核心数字,以便把它连接起来,造成损失?

我认为,我的问题是,你是否就如何在这种局势中安排项目提出建议?

感谢。

最佳回答

将其原始项目档案作为的复印件 CoreLib.vcxproj (如果是其他甚小公司,则检查遗嘱延期。)

Add CoreLib.vcxproj, as a existing project to You Solutions and Save the You Solutions.

Go to the properties->Configuration Property-> General of CoreLib

选择all Configurations(左上角)。

更改财产 结构类型static Library

更改财产Target extension.lib

Append to property Intermediate Chefy for example Lib.

Go to the properties->Configuration Property->C/C++->Preporcessor

选择Debug Configuration(左上角)。

现将财产Preprocessor Defins ,并将_USRDL改为_USRLIB

选择Release Configuration(左上角)。

现将财产Preprocessor Defins ,并将_USRDL改为_USRLIB

In your header-file you should have something like the following:

#ifdef MyDll_EXPORTS
#define MyDll_API        __declspec(dllexport)
#else
#define MyDll_API        __declspec(dllimport)
#endif

修改如下:

#ifdef MyDll_EXPORTS    
#ifdef _USRLIB    
#define MyDll_API    
#else    
#define MyDll_API        __declspec(dllexport)    
#endif    
#else 
// Here must deploy your own logic whether static or dynamic linking is used.
// read my comment below
#define MyDll_API        __declspec(dllimport)    
#endif

您 建设能产生原样和进口平衡以及新的静态平衡!

问题回答

也许你可以检查一下像CMake这样的建筑系统对本案有何作用。 我猜测,它将为每个案件产生两个项目。 但是,通过创造这种解决办法,它可能节省很多工作。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签