question

DfunfgItal-6564 avatar image
0 Votes"
DfunfgItal-6564 asked DfunfgItal-6564 edited

Switching Visual Studio Project to x64 Causes atlcore.h to not Compile

I'm trying to port some code from x86 to x64. It's a rather large code base and has survived from Visual Studio 2010. I recently ported it to Visual Studio 2019 and it build and operates fine but when I change to x64 atlcore.h refuses to compile and complains of redefinition issues and return types not matching even when they do. Anyone understand why changing to x64 would cause this to change?

I get errors such as:

Error (active) E0120 return value type does not match the function type C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\atlmfc\include\atlcore.h 290

Error (active) E0144 a value of type "HINSTANCE" cannot be used to initialize an entity of type "HINSTANCE" C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\atlmfc\include\atlcore.h 407

Error (active) E0311 cannot overload functions distinguished by return type alone C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\atlmfc\include\atlcore.h 447


c++vs-debugging
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Please tell us the version of VS 2019. See E0144 being reported for valid code. (Intellisense error) - Visual Studio Feedback; that is a report of a bug that was fixed. The strange thing is that I can't find much about E0120 and E0311. It would also help if you posted lines 290, 407 and 447 of atlcore.h so that people can be sure of what the errors are referring to.


0 Votes 0 ·

Did you also get nonignorable compiler errors?


0 Votes 0 ·

Hi @DfunfgItal-6564 , if possible, could you share all errors and some simple demos(code snippets) with us to check further?

0 Votes 0 ·

0 Answers