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

C2664 fails the build in VS2019 with --clr #213

Open
OZ1 opened this issue Oct 25, 2019 · 3 comments
Open

C2664 fails the build in VS2019 with --clr #213

OZ1 opened this issue Oct 25, 2019 · 3 comments

Comments

@OZ1
Copy link

OZ1 commented Oct 25, 2019

In Visual Studio 2019 I have a bunch of the following errors:

D:/git/xed/a/obj/xed-encoder-0.c(2331): error C2664: "void xed3_operand_set_error(xed_decoded_inst_t *,xed_error_enum_t)": невозможно преобразовать аргумент 2 из "const char" в "xed_error_enum_t" D:/git/xed/a/obj/xed-encoder-0.c(2331): note: Для преобразования в перечисляемый тип требуется явное приведение (static_cast, приведение в стиле С или приведение в стиле функции) D:\git\xed\a\obj\xed-operand-accessors.h(1107): note: см. объявление "xed3_operand_set_error"

"const char" to "xed_XXX_enum_t" fails implicitly. casts should be added.

Оптимизирующий компилятор Microsoft (R) C/C++ версии 19.23.28106.4 для x64

@markcharney
Copy link
Contributor

I'll upgrade my vs2019 and take a look... thx

@OZ1
Copy link
Author

OZ1 commented Oct 25, 2019

add --clr option like this:
cls& python ..\xed\mfile.py --shared --clr

@OZ1 OZ1 changed the title C2664 fails the build in VS2019 C2664 fails the build in VS2019 with --clr Oct 25, 2019
@markcharney
Copy link
Contributor

I reproduced it (in English). More than just that once cast to fix.

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

No branches or pull requests

2 participants