Share via


VS2015 compiler error C3861: 'LCMapStringEx': identifier not found

Question

Tuesday, January 10, 2017 1:41 PM

My C++ code compiles fine with VS 2013 but when I have compiled with VS 2015 I get this error:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\atlwinverapi.h(710): error C3861: 'LCMapStringEx': identifier not found

I don't use LCMapString anywhere in my code, so I don't know where this come from? Can you help me in resolving this error?

All replies (10)

Wednesday, January 11, 2017 2:26 PM ✅Answered | 1 vote

Maybe you can see similar threads like :

http://stackoverflow.com/questions/23640791/compile-errors-upgrading-atl-project-from-vs2010-to-vs2013

(WINVER or _WIN32_WINNT)


Wednesday, January 11, 2017 7:20 AM

Hi smhaneef,

Welcome to the MSDN forum.

Refer to your description, your issue is more relates to the development of C++. Since our forum is to discuss Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor, I will help you move it to the appropriate forum: Visual Studio LanguagesVisual C++  for dedicated information, you will get a more professional support from there, thank you for your understanding.

Best regards

Sara

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


Wednesday, January 11, 2017 7:22 AM

Hi smhaneef,

thanks for posting here.

>>I don't use LCMapString anywhere in my code, so I don't know where this come from? Can you help me in resolving this error?

Have you tried to manually delete all the obj files, then clean and rebuild your project with vs 2015?  Or you could create a new projct with vs 2015, add your source files into this new project and rebuild again.

Hope this could be help of you.

Best Regards,

Sera Yu

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


Wednesday, January 11, 2017 11:54 AM

My C++ code compiles fine with VS 2013 but when I have compiled with VS 2015 I get this error:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\atlwinverapi.h(710): error C3861: 'LCMapStringEx': identifier not found

I don't use LCMapString anywhere in my code, so I don't know where this come from? Can you help me in resolving this error?

Does your code have a #include statement for either Windows.h or Winnls.h?  If not, insert one.


Wednesday, January 11, 2017 2:21 PM

Yes. My code have a #include statement for both Windows.h or Winnls.h.

i am getting this compiler error while building the StdAfx.cpp file.

1> Build started: Project: CwControls, Configuration: Debug Win32
1>cl : Command line warning D9035: option 'Zc:forScope-' has been deprecated and will be removed in a future release
1>  StdAfx.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\atlwinverapi.h(710): error C3861: 'LCMapStringEx': identifier not found


Wednesday, January 11, 2017 2:25 PM

I tried it by deleting all the obj files manually. Still I have the same problem. I need to try creating a new project with vs 2015 and adding the source files.


Wednesday, January 11, 2017 2:41 PM

Correcting the version details of _WIN32_WINNT, _WIN32_WINNT solved the issue.


Wednesday, January 11, 2017 2:43 PM

Yes. My code have a #include statement for both Windows.h or Winnls.h.

i am getting this compiler error while building the StdAfx.cpp file.

1> Build started: Project: CwControls, Configuration: Debug Win32
1>cl : Command line warning D9035: option 'Zc:forScope-' has been deprecated and will be removed in a future release
1>  StdAfx.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\atlwinverapi.h(710): error C3861: 'LCMapStringEx': identifier not found

The atlwinverapi.h header references LCMapStringEx when it thinks the project is targeting Vista and later Windows versions.  Check to make sure that nothing in your project is conflicting to cause Windows.h and/or Winnls.h headers to exclude the LCMapStringEx function prototype.  You can specify that you are targeting Vista and later versions by using -

#define NTDDI_VERSION NTDDI_VISTA
#define _WIN32_WINNT _WIN32_WINNT_VISTA

before including the windows and atl headers.  See Using the Windows Headers


Thursday, August 3, 2017 2:12 PM

Please use these macros in the Project .cpp files.

#define _WIN32_WINNT 0x0A00

#define _USING_V110_SDK71_
#define _ATL_XP_TARGETING

Notice that the value of _WIN32_WINNT depends of your computer.

Please research at your code deeply.

Thanks


Tuesday, September 12, 2017 10:17 AM

Correcting the version details of _WIN32_WINNT, WINVER solved the issue.
Go to:
Properties->Configuration properties->C/C++->Preprocessor->Preprocessor Definitions and check what macros are defined.
changing them to 
                   NTDDI_VERSION= 0x06030000
                   WINVER=0x0A00
                   _WIN32_WINNT=0x0A00
solved my problem.