I need to work on a project that was written in msvcpp6.0sp6
I DIDN’T write the project. I know very little about its inner works. I DO know it WAS POSSIBLE to build it in the past.
while trying to build this project that was built successfuly in the past(not by me)
I get the error:
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
for example:
error C2664: ‘strncpy’ : cannot convert parameter 2 from ‘const unsigned short *’ to ‘const char *’
error C2664: ‘void __cdecl CString::Format(const unsigned short *,…)’ : cannot convert parameter 1
for a few dozen implicit conversions. I mustn’t change the code. how can I force the complier to accept the implicit convertions?
Quite likely you need to get the same compiler that was used for the code in the first place, and use that.
If my guess (in a comment on unwind’s answer) is correct about that
unsigned short*error then it’s simply not possible to compile this code in Unicode mode, because the source is insufficiently portable. Suppressing the error for the conversion, even if it’s possible via some compiler setting, will just result in code that compiles but doesn’t work.I’d expect that also to imply that the old dll probably isn’t compatible with the rest of your current code, but if you’ve been using it up to now then either I’m wrong about the reason, or else you’ve got away with it somehow.