Help linking (LNK2022)

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Help linking (LNK2022)

Postby pmpysz » Wed Apr 25, 2012 10:11 am

I'm currently trying to build a C++ CLI wrapper in VS 2011. I've customized my project and the libcef_dll_wrapper to match each other. However I get the following LNK2022 errors when trying to build (see text/image below). I've read the MSDN reference to it. I really don't know how to fix it though. I don't think it has anything to do with my code specifically, but how the "/clr" flag affects the compiler. Another thing that is odd is that the "duplicated types" are all std types. I've done a fair bit of googling and have yet to come up with a solution.

Thanks for any help or advice!

Code: Select all
1>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.logic_error): (0x0200009b).
1>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.domain_error): (0x0200009c).
1>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.invalid_argument): (0x0200009d).
1>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.length_error): (0x0200009e).
1>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.out_of_range): (0x0200009f).
1>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.runtime_error): (0x020000a0).
1>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.overflow_error): (0x020000a2).
1>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.underflow_error): (0x020000a3).
1>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.range_error): (0x020000a4).
1>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.bad_cast): (0x020000a5).
1>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.system_error): (0x020000bb).
1>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (failure): (0x020000c1).
1>libcef_dll_wrapper.lib(app_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.logic_error): (0x0200009b).
1>libcef_dll_wrapper.lib(app_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.domain_error): (0x0200009c).
1>libcef_dll_wrapper.lib(app_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.invalid_argument): (0x0200009d).
1>libcef_dll_wrapper.lib(app_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.length_error): (0x0200009e).
1>libcef_dll_wrapper.lib(app_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.out_of_range): (0x0200009f).
1>libcef_dll_wrapper.lib(app_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.runtime_error): (0x020000a0).
1>libcef_dll_wrapper.lib(app_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.overflow_error): (0x020000a2).
1>libcef_dll_wrapper.lib(app_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.underflow_error): (0x020000a3).
1>libcef_dll_wrapper.lib(app_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.range_error): (0x020000a4).
1>libcef_dll_wrapper.lib(app_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.bad_cast): (0x020000a5).
1>libcef_dll_wrapper.lib(app_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.system_error): (0x020000bb).
1>libcef_dll_wrapper.lib(app_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (failure): (0x020000c1).
1>libcef_dll_wrapper.lib(scheme_handler_factory_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.logic_error): (0x0200009b).
1>libcef_dll_wrapper.lib(scheme_handler_factory_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.domain_error): (0x0200009c).
1>libcef_dll_wrapper.lib(scheme_handler_factory_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.invalid_argument): (0x0200009d).
1>libcef_dll_wrapper.lib(scheme_handler_factory_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.length_error): (0x0200009e).
1>libcef_dll_wrapper.lib(scheme_handler_factory_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.out_of_range): (0x0200009f).
1>libcef_dll_wrapper.lib(scheme_handler_factory_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.runtime_error): (0x020000a0).
1>libcef_dll_wrapper.lib(scheme_handler_factory_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.overflow_error): (0x020000a2).
1>libcef_dll_wrapper.lib(scheme_handler_factory_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.underflow_error): (0x020000a3).
1>libcef_dll_wrapper.lib(scheme_handler_factory_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.range_error): (0x020000a4).
1>libcef_dll_wrapper.lib(scheme_handler_factory_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.bad_cast): (0x020000a5).
1>libcef_dll_wrapper.lib(scheme_handler_factory_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.system_error): (0x020000bb).
1>libcef_dll_wrapper.lib(scheme_handler_factory_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (failure): (0x020000c1).
1>libcef_dll_wrapper.lib(task_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.logic_error): (0x0200009b).
1>libcef_dll_wrapper.lib(task_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.domain_error): (0x0200009c).
1>libcef_dll_wrapper.lib(task_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.invalid_argument): (0x0200009d).
1>libcef_dll_wrapper.lib(task_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.length_error): (0x0200009e).
1>libcef_dll_wrapper.lib(task_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.out_of_range): (0x0200009f).
1>libcef_dll_wrapper.lib(task_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.runtime_error): (0x020000a0).
1>libcef_dll_wrapper.lib(task_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.overflow_error): (0x020000a2).
1>libcef_dll_wrapper.lib(task_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.underflow_error): (0x020000a3).
1>libcef_dll_wrapper.lib(task_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.range_error): (0x020000a4).
1>libcef_dll_wrapper.lib(task_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.bad_cast): (0x020000a5).
1>libcef_dll_wrapper.lib(task_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.system_error): (0x020000bb).
1>libcef_dll_wrapper.lib(task_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (failure): (0x020000c1).
1>libcef_dll_wrapper.lib(v8handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.logic_error): (0x0200009e).
1>libcef_dll_wrapper.lib(v8handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.domain_error): (0x0200009f).
1>libcef_dll_wrapper.lib(v8handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.invalid_argument): (0x020000a0).
1>libcef_dll_wrapper.lib(v8handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.length_error): (0x020000a1).
1>libcef_dll_wrapper.lib(v8handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.out_of_range): (0x020000a2).
1>libcef_dll_wrapper.lib(v8handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.runtime_error): (0x020000a3).
1>libcef_dll_wrapper.lib(v8handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.overflow_error): (0x020000a5).
1>libcef_dll_wrapper.lib(v8handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.underflow_error): (0x020000a6).
1>libcef_dll_wrapper.lib(v8handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.range_error): (0x020000a7).
1>libcef_dll_wrapper.lib(v8handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.bad_cast): (0x020000a8).
1>libcef_dll_wrapper.lib(v8handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.system_error): (0x020000be).
1>libcef_dll_wrapper.lib(v8handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (failure): (0x020000c4).
1>libcef_dll_wrapper.lib(proxy_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.logic_error): (0x0200009b).
1>libcef_dll_wrapper.lib(proxy_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.domain_error): (0x0200009c).
1>libcef_dll_wrapper.lib(proxy_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.invalid_argument): (0x0200009d).
1>libcef_dll_wrapper.lib(proxy_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.length_error): (0x0200009e).
1>libcef_dll_wrapper.lib(proxy_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.out_of_range): (0x0200009f).
1>libcef_dll_wrapper.lib(proxy_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.runtime_error): (0x020000a0).
1>libcef_dll_wrapper.lib(proxy_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.overflow_error): (0x020000a2).
1>libcef_dll_wrapper.lib(proxy_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.underflow_error): (0x020000a3).
1>libcef_dll_wrapper.lib(proxy_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.range_error): (0x020000a4).
1>libcef_dll_wrapper.lib(proxy_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.bad_cast): (0x020000a5).
1>libcef_dll_wrapper.lib(proxy_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.system_error): (0x020000bb).
1>libcef_dll_wrapper.lib(proxy_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (failure): (0x020000c1).
1>libcef_dll_wrapper.lib(render_process_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.logic_error): (0x0200009b).
1>libcef_dll_wrapper.lib(render_process_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.domain_error): (0x0200009c).
1>libcef_dll_wrapper.lib(render_process_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.invalid_argument): (0x0200009d).
1>libcef_dll_wrapper.lib(render_process_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.length_error): (0x0200009e).
1>libcef_dll_wrapper.lib(render_process_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.out_of_range): (0x0200009f).
1>libcef_dll_wrapper.lib(render_process_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.runtime_error): (0x020000a0).
1>libcef_dll_wrapper.lib(render_process_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.overflow_error): (0x020000a2).
1>libcef_dll_wrapper.lib(render_process_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.underflow_error): (0x020000a3).
1>libcef_dll_wrapper.lib(render_process_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.range_error): (0x020000a4).
1>libcef_dll_wrapper.lib(render_process_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.bad_cast): (0x020000a5).
1>libcef_dll_wrapper.lib(render_process_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.system_error): (0x020000bb).
1>libcef_dll_wrapper.lib(render_process_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (failure): (0x020000c1).
1>libcef_dll_wrapper.lib(resource_bundle_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.logic_error): (0x0200009b).
1>libcef_dll_wrapper.lib(resource_bundle_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.domain_error): (0x0200009c).
1>libcef_dll_wrapper.lib(resource_bundle_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.invalid_argument): (0x0200009d).
1>libcef_dll_wrapper.lib(resource_bundle_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.length_error): (0x0200009e).
1>libcef_dll_wrapper.lib(resource_bundle_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.out_of_range): (0x0200009f).
1>libcef_dll_wrapper.lib(resource_bundle_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.runtime_error): (0x020000a0).
1>libcef_dll_wrapper.lib(resource_bundle_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.overflow_error): (0x020000a2).
1>libcef_dll_wrapper.lib(resource_bundle_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.underflow_error): (0x020000a3).
1>libcef_dll_wrapper.lib(resource_bundle_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.range_error): (0x020000a4).
1>libcef_dll_wrapper.lib(resource_bundle_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.bad_cast): (0x020000a5).
1>libcef_dll_wrapper.lib(resource_bundle_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.system_error): (0x020000bb).
1>libcef_dll_wrapper.lib(resource_bundle_handler_cpptoc.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (failure): (0x020000c1).
1>libcef_dll_wrapper.lib(command_line_ctocpp.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.logic_error): (0x0200009d).
1>libcef_dll_wrapper.lib(command_line_ctocpp.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.domain_error): (0x0200009e).
1>libcef_dll_wrapper.lib(command_line_ctocpp.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.invalid_argument): (0x0200009f).
1>libcef_dll_wrapper.lib(command_line_ctocpp.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.length_error): (0x020000a0).
1>LINK : fatal error LNK1255: link failed because of metadata errors


Image
pmpysz
Newbie
 
Posts: 2
Joined: Wed Apr 25, 2012 9:53 am

Re: Help linking (LNK2022)

Postby keshav » Sun May 06, 2012 11:10 pm

are u using visual studio and what version
keshav
Mentor
 
Posts: 82
Joined: Mon Jan 16, 2012 11:33 pm

Re: Help linking (LNK2022)

Postby pmpysz » Thu May 10, 2012 10:14 am

keshav wrote:are u using visual studio and what version


Yes, VS 11 Beta. I've had a lot more success with it compared to 2010.
pmpysz
Newbie
 
Posts: 2
Joined: Wed Apr 25, 2012 9:53 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 182 guests