C/C++ Project Problem or Issue Summary and Solution

1 Windows Platform Issue Fix

1.1 Error LNK1112 module machine type ‘x64’ conflicts with target machine type ‘x86’

Severity Code Description Project File Line Suppression State
Error LNK1112 module machine type ‘x64’ conflicts with target machine type ‘x86’ libcef_dll_wrapper E:\git-code\cef_binary_79.1.35+gfebbb4a+chromium-79.0.3945.130_windows64\build\libcef_dll_wrapper\x64\Debug\shutdown_checker.obj 1
How to Fix:
1.Linker->Commandline->/machine:X64(32)
2.Configuration->Preprocessor->Preprocessor Definitions->WIN32改为_WIN64
3.Check your dependent lib and dll, If they all compile in x64.

1.2 inconsistent dll linkage

If you have a Dll or Lib project, you have a Interface like this, you will got this error. You just need Add the ROUND_BUFFER_EXPORTS export macro in project “Preprocessor Definition” to fix this error.

#ifndef __ROUND_BUFFER_H__
#define __ROUND_BUFFER_H__

#ifdef __cplusplus
extern "C" {
#endif

#ifdef _WIN32
#ifdef ROUND_BUFFER_EXPORTS
#define ROUND_BUFFER_API __declspec(dllexport)
#else
#define ROUND_BUFFER_API __declspec(dllimport)
#endif
#else
#define ROUND_BUFFER_API
#endif

#ifdef _WIN64
	typedef unsigned long long ulonglong;
#else 
	typedef unsigned long ulonglong;
#endif
	ROUND_BUFFER_API void buffer_reset();
    ...............................
#ifdef __cplusplus
}
#endif
#endif // __ROUND_BUFFER_H__

1.3 LNK1000 Internal error during IMAGE::BuildImage

  1. Configuration->Target Extension to your supposed extension if you was changed the extension.
  2. Configuration ->Whole Program Optimization -> No Common Language Runtime Support.
  3. Configuration ->General ->Enabled Increment Link ->No(/INCREMENTAL:NO)
    The above operation is I have done to fix the error. but I thought those operation was not the root cause…

1.4 The build tools for v142 (Platform Toolset = ‘v142’) cannot be found.

1.Click the project Open the Property=>General=>Platform Toolset=>Change to the toolset you have installed=>rebuild it.
2.Update your VS IDE installed the toolset the target project needed.

1.5 How to Open Windows Coredump

Save below code to your local machine, then rename the local to **.reg. If you wan to open this function just double click this reg file.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\]
"DumpFolder"=hex(2):44,00,3a,00,5c,00,43,00,72,00,61,00,73,00,68,00,44,00,75,\
  00,6d,00,70,00,73,00,00,00
"DumpCount"=dword:0000000a
"DumpType"=dword:00000002

1.6 Error LNK2019 unresolved external symbol _Sleep referenced in function _thread_work_func

2 Linux Platform Issue Fix

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值