Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error C4146: unary minus operator applied to unsigned type, result still unsigned and linker errors on Windows, VS2022 latest version #2193

Open
Tracked by #2015
ghost opened this issue Nov 12, 2023 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 12, 2023

The first problem can be bypassed by disabling the /sdl flag.
The second problem is related to ARMMapping.c at lines 76 and 708. The error is as below:

E0029 expected …\capstone\arch\ARM\ARMMapping.c 76
E0029 expected …\capstone\arch\ARM\ARMMapping.c 708

The static library compiles successfully, however the test project shows linker errors while compiling. Here is the log file when I try to compile test_x86:
Build started... 1>------ Build started: Project: test_x86, Configuration: Release x64 ------ 1>capstone.lib(ARMMapping.obj) : error LNK2001: unresolved external symbol ARMSysReg_lookupMClassSysRegByEncoding 1>capstone.lib(ARMMapping.obj) : error LNK2001: unresolved external symbol ARM_getFeatureBits 1>capstone.lib(ARMMapping.obj) : error LNK2001: unresolved external symbol ARMSysReg_lookupMClassSysRegBy12bitSYSmValue 1>capstone.lib(ARMMapping.obj) : error LNK2001: unresolved external symbol ARMSysReg_lookupMClassSysRegBy8bitSYSmValue 1>capstone.lib(ARMMapping.obj) : error LNK2001: unresolved external symbol ARMSysReg_lookupMClassSysRegAPSRNonDeprecated 1>capstone.lib(PPCInstPrinter.obj) : error LNK2001: unresolved external symbol matchAliasPatterns 1>capstone.lib(AArch64BaseInfo.obj) : error LNK2001: unresolved external symbol binsearch_IndexTypeEncoding 1>capstone.lib(ARMInstPrinter.obj) : error LNK2001: unresolved external symbol binsearch_IndexTypeStrEncoding 1>capstone.lib(ARMInstPrinter.obj) : error LNK2001: unresolved external symbol markup 1>capstone.lib(ARMInstPrinter.obj) : error LNK2001: unresolved external symbol getUseMarkup 1>capstone.lib(ARMDisassembler.obj) : error LNK2001: unresolved external symbol isValidCoprocessorNumber 1>capstone.lib(ARMDisassembler.obj) : error LNK2001: unresolved external symbol VPTBlock_getVPTPred 1>capstone.lib(ARMDisassembler.obj) : error LNK2001: unresolved external symbol ITBlock_instrLastInITBlock 1>capstone.lib(ARMDisassembler.obj) : error LNK2001: unresolved external symbol Check 1>capstone.lib(ARMDisassembler.obj) : error LNK2001: unresolved external symbol isVPTOpcode 1>capstone.lib(ARMDisassembler.obj) : error LNK2001: unresolved external symbol ARM_isCDECoproc 1>capstone.lib(ARMDisassembler.obj) : error LNK2001: unresolved external symbol VPTBlock_instrInVPTBlock 1>capstone.lib(ARMDisassembler.obj) : error LNK2001: unresolved external symbol ITBlock_advanceITState 1>capstone.lib(ARMDisassembler.obj) : error LNK2001: unresolved external symbol ARM_isVpred 1>capstone.lib(ARMDisassembler.obj) : error LNK2001: unresolved external symbol ITBlock_instrInITBlock 1>capstone.lib(ARMDisassembler.obj) : error LNK2001: unresolved external symbol ITBlock_setITState 1>capstone.lib(ARMDisassembler.obj) : error LNK2001: unresolved external symbol VPTBlock_setVPTState 1>capstone.lib(ARMDisassembler.obj) : error LNK2001: unresolved external symbol ITBlock_getITCC 1>capstone.lib(ARMDisassembler.obj) : error LNK2001: unresolved external symbol VPTBlock_advanceVPTState 1>I:\Codes22H2\Trinton_Dependencies\capstone\msvc\x64\Release\test_x86.exe : fatal error LNK1120: 24 unresolved externals 1>Done building project "test_x86.vcxproj" -- FAILED.

@ghost ghost changed the title error C4146: unary minus operator applied to unsigned type, result still unsigned and linker errors on VS2022 latest version error C4146: unary minus operator applied to unsigned type, result still unsigned and linker errors on Windows, VS2022 latest version Nov 12, 2023
@Rot127
Copy link
Collaborator

Rot127 commented Nov 21, 2023

Added it to #2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant