English 中文(简体)
我们可否无视MySQL++ C4275的警告?
原标题:Could we ignore the MySQL++ C4275 warning?
c:program filesmicrosoft visual studio 9.0vcinclude
esult.h(212) : warning C4275: non dll-interface class  std::_Container_base_aux  used as base for dll-interface class  std::_Container_base_aux_alloc_real<_Alloc> 
1>        with
1>        [
1>            _Alloc=std::allocator<mysqlpp::Row>
1>        ]
1>        C:Program FilesMicrosoft Visual Studio 9.0VCincludexutility(377) : see declaration of  std::_Container_base_aux 

这可能是造成与集装箱有关的任何问题的原因,还是能够在2008年视觉演播室中安全地忽视这一问题?

问题回答

在此情况下,我认为这取决于以下因素:开业时间。 为了使客户使用这一类别,它必须使用客户而不是DL方面提供的定义。 为此,客户汇编者应当与DLL汇编者完全相同。

除了类别定义无法跨越模块边界之外,还有记忆所有权可以考虑。

如果你来自一个内部变异的阶层,例如:扼杀,那将是一场等待发生的灾难。 如果批次使用另一组别的申请时间不同,则会发生下列情况:

  • Base initializes the string with a text value.
  • Derived would try to change the string.
  • It would try to release the heap memory of the string.

这并不限于训示。 这只是一个例子。 任何假设情况,如果1个操作时间分配某种东西,另一个交易地点将造成坠毁。

记忆由基级使用的运行时间掌握。 产阶级的操作时间试图将其释放——“并”即时坠毁。 你们听任输家的摆布,以便给你一个同一批C++编造者汇编成册的ll子,并使用同一时间。 这是一种夜总会。

<>DL 阶级界面无疑是有史以来最坏的想法。

唯一的两项豁免是:

  • you use DCOM (or pure abstract classes, which is the same idea)
  • you are in control of the entire code tree. For example the dll and the exe are built in the same solution.

在其他所有情况下,DL课堂界面都支持夜总会和等待发生的灾害。

I think this thread can possibly suggest you a solution.

www.un.org/Depts/DGACM/index_spanish.htm 如果你以同样的汇编者汇编所有材料并使用<代码>/MD,可自由忽视C4275。 因此,所有单元都有相同的运行时间。





相关问题
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?

热门标签