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

- fix vc2019 compiler error for unit-tests; #95

Merged
merged 5 commits into from
Mar 24, 2021

Conversation

randydu
Copy link
Contributor

@randydu randydu commented Mar 20, 2021

The vc2019 cannot compile the code (UnitTests\TestDisassembler.cpp) with error C2440:

error C2440: 'initializing': cannot convert from 'initializer list' to 'std::vector<char *,std::allocator<char *>>'
note: No constructor could take the source type, or constructor overload resolution was ambiguous

@stevemk14ebr
Copy link
Owner

stevemk14ebr commented Mar 21, 2021

Can you explain how you are building. The project should compile as is without issues with visual studio 2019

@randydu
Copy link
Contributor Author

randydu commented Mar 22, 2021

I compile the code with warnings as error.

In gcc, the following code compiles with different warning message:

std::vector<char*> samples = { "xxx", "yyy", "zzz"};

warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]

I got other compiling issues when trying to integrate this project with another master project, which defines NOMINMAX and UNICODE, _UNICODE in global settings.

@stevemk14ebr
Copy link
Owner

No I mean how exactly are you building, from cmake, via visual studio in cmake mode, via a generated visual studio project, copy and pasting sources/headers into an existing project? Some configurations are supported and some are not

@stevemk14ebr stevemk14ebr merged commit 146c97e into stevemk14ebr:master Mar 24, 2021
@stevemk14ebr
Copy link
Owner

Thanks for your contribution, I don't understand why you had these errors, but the changes are valid so thank you.

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

Successfully merging this pull request may close these issues.

None yet

2 participants