English 中文(简体)
VS2010年快递――重新定义和无效公约错误
原标题:Boost in VS2010 Express - redefinition and invalid calling convention errors

我正在使用VS2010快车和刚刚安装的Boston诉1_47。 我增加了添加的夹,包括文件夹选项,以及VS额外图书馆选项的校正镜。

然后,我把“加强/管理”列入我的一份档案,但实际上没有用“推动”来撰写任何法典。 然而,在建立解决办法时,我收到了许多错误信息,其来源是两条fl:

  • Redefiniton errors, such as:

1>D:oostoost_1_47oost/detail/interlocked.hpp(83): error C2373: _InterlockedCompareExchangePointer : redefinition; different type modifiers 1> C:Program FilesMicrosoft SDKsWindowsv7.1includewinnt.h(2597) : see declaration of _InterlockedCompareExchangePointer

  • Invalid calling convention errors (lots of these), such as:

D:oostoost_1_47oost/regex/v4/regex_traits_defaults.hpp(271): error C3641: boost::re_detail::global_lower : invalid calling convention __cdecl for function compiled with /clr:pure or /clr:safe

注:我没有在我的任何来源/标题档案中明确列入“赢家”,并试图拆开事先编织的头盔,去除 st子,但并没有解决问题。

What s going on?

Thanks in advance

问题回答

You have to make sure that you compile your program with the same settings as boost. It seems like you used the wrong project template (CLR something) to create your application project.

您可尝试修改您现有项目的特性,使之与推动相适应,但<代码>。 CLR ......项目有许多不兼容的财产价值因违约而确定,因此认为最容易的方式是从头开始(并进口你现有的法典)。

You should use the "Empty Project" template and create a new project, and then add your existing source and header files to it, and add the boost include path again, and add any required boost .lib files to Project Properties > Linker > Input > Additional Dependencies (Most boost libraries work out of the box without adding anything to linker inputs because they are header only, so you might not need to add any .libs).

诱杀是需要C++的,由C++代码而不是C++/CLI代码加以消费,因此只能使用本土C++级,而大多数助推器将产生头盔,列入载有C++/CLI代码的来源档案。





相关问题
how to reliable capture display setting changed

static void Main() { // Set the SystemEvents class to receive event notification when a user // when display settings change. SystemEvents.DisplaySettingsChanged += new ...

Why use CComBSTR instead of just passing a WCHAR*?

I m new to COM. What exactly is the advantage of replacing: L"String" with CComBSTR(L"String") I can see a changelist in the COM part of my .NET application where all strings are replaced in this ...

COM Basic links

folks can you provide me the tutorial link or .pdf for learning basic COM?. i do google it.. still i recommend answers of stackoverflow so please pass me.. Thanks

Statically linking Winsock?

I m using Winsock 1.1 in my project. I include wsock32.lib in "Additional Dependencies". I m looking at the DLL project using depends.exe and notice that the DLL depends on wsock32.dll. How can I ...

热门标签