Problem with building a solution
-
Hello everyone. I have a problem with the new Visual studio 2012 Premium edition. The problems start when vs2012 was installed on my working pc. Then the project (under vs2010) stopped compiling on both versions even when it was transformed for vs2012. After that all SDKs and Visual Studios were removed and only vs2012 and SDK 7.1 were installed. But the projects didn't compile. After fixing the Include Directories and Library Directories the projects finally run perfectly on my boss'es machine, but not mine. The errors which i get are these :
e:\programs\msvs\2012\vc\atlmfc\src\mfc\afximpl.h(423): error C2039: 'CompareStringEx' : is not a member of global namespace
1>e:\programs\msvs\2012\vc\atlmfc\src\mfc\afximpl.h(423): error C2065: 'LOCALE_NAME_INVARIANT' : undeclared identifier
1>e:\programs\msvs\2012\vc\atlmfc\src\mfc\afximpl.h(423): error C3861: 'CompareStringEx': identifier not foundThese are the only errors i get and all the projects in the solution are throwing them. I have updated Windows(with all the updates available) the Include Directories look like this:
$(VCInstallDir)include
$(VCInstallDir)atlmfc\include
$(WindowsSdkDir)include
$(WindowsSDK_IncludePath)
$(FrameworkSDKDir)\includeThe Library directories look like this:
$(WindowsSDK_LibraryPath_x86)
$(VCInstallDir)lib
$(VCInstallDir)atlmfc\lib
$(WindowsSdkDir)lib
$(FrameworkSDKDir)\libIf you have some ideas please share them with me. Thank you. P.S I am using Windows 7
-
Hello everyone. I have a problem with the new Visual studio 2012 Premium edition. The problems start when vs2012 was installed on my working pc. Then the project (under vs2010) stopped compiling on both versions even when it was transformed for vs2012. After that all SDKs and Visual Studios were removed and only vs2012 and SDK 7.1 were installed. But the projects didn't compile. After fixing the Include Directories and Library Directories the projects finally run perfectly on my boss'es machine, but not mine. The errors which i get are these :
e:\programs\msvs\2012\vc\atlmfc\src\mfc\afximpl.h(423): error C2039: 'CompareStringEx' : is not a member of global namespace
1>e:\programs\msvs\2012\vc\atlmfc\src\mfc\afximpl.h(423): error C2065: 'LOCALE_NAME_INVARIANT' : undeclared identifier
1>e:\programs\msvs\2012\vc\atlmfc\src\mfc\afximpl.h(423): error C3861: 'CompareStringEx': identifier not foundThese are the only errors i get and all the projects in the solution are throwing them. I have updated Windows(with all the updates available) the Include Directories look like this:
$(VCInstallDir)include
$(VCInstallDir)atlmfc\include
$(WindowsSdkDir)include
$(WindowsSDK_IncludePath)
$(FrameworkSDKDir)\includeThe Library directories look like this:
$(WindowsSDK_LibraryPath_x86)
$(VCInstallDir)lib
$(VCInstallDir)atlmfc\lib
$(WindowsSdkDir)lib
$(FrameworkSDKDir)\libIf you have some ideas please share them with me. Thank you. P.S I am using Windows 7
You're not alone. Are you using Windows XP? http://social.msdn.microsoft.com/Forums/en-US/vcmfcatl/thread/17e5f678-c9b2-448e-a66d-299ff1e9fec1/
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.
-
You're not alone. Are you using Windows XP? http://social.msdn.microsoft.com/Forums/en-US/vcmfcatl/thread/17e5f678-c9b2-448e-a66d-299ff1e9fec1/
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.
-
Hello everyone. I have a problem with the new Visual studio 2012 Premium edition. The problems start when vs2012 was installed on my working pc. Then the project (under vs2010) stopped compiling on both versions even when it was transformed for vs2012. After that all SDKs and Visual Studios were removed and only vs2012 and SDK 7.1 were installed. But the projects didn't compile. After fixing the Include Directories and Library Directories the projects finally run perfectly on my boss'es machine, but not mine. The errors which i get are these :
e:\programs\msvs\2012\vc\atlmfc\src\mfc\afximpl.h(423): error C2039: 'CompareStringEx' : is not a member of global namespace
1>e:\programs\msvs\2012\vc\atlmfc\src\mfc\afximpl.h(423): error C2065: 'LOCALE_NAME_INVARIANT' : undeclared identifier
1>e:\programs\msvs\2012\vc\atlmfc\src\mfc\afximpl.h(423): error C3861: 'CompareStringEx': identifier not foundThese are the only errors i get and all the projects in the solution are throwing them. I have updated Windows(with all the updates available) the Include Directories look like this:
$(VCInstallDir)include
$(VCInstallDir)atlmfc\include
$(WindowsSdkDir)include
$(WindowsSDK_IncludePath)
$(FrameworkSDKDir)\includeThe Library directories look like this:
$(WindowsSDK_LibraryPath_x86)
$(VCInstallDir)lib
$(VCInstallDir)atlmfc\lib
$(WindowsSdkDir)lib
$(FrameworkSDKDir)\libIf you have some ideas please share them with me. Thank you. P.S I am using Windows 7
try adding this to stdafx.h
#define _USING_V110_SDK71_
See here for clues. http://connect.microsoft.com/VisualStudio/feedback/details/773422/compiler-error-when-using-v110-xp-platform-toolset-visual-studio-2012
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.
-
try adding this to stdafx.h
#define _USING_V110_SDK71_
See here for clues. http://connect.microsoft.com/VisualStudio/feedback/details/773422/compiler-error-when-using-v110-xp-platform-toolset-visual-studio-2012
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.
-
Hello everyone. I have a problem with the new Visual studio 2012 Premium edition. The problems start when vs2012 was installed on my working pc. Then the project (under vs2010) stopped compiling on both versions even when it was transformed for vs2012. After that all SDKs and Visual Studios were removed and only vs2012 and SDK 7.1 were installed. But the projects didn't compile. After fixing the Include Directories and Library Directories the projects finally run perfectly on my boss'es machine, but not mine. The errors which i get are these :
e:\programs\msvs\2012\vc\atlmfc\src\mfc\afximpl.h(423): error C2039: 'CompareStringEx' : is not a member of global namespace
1>e:\programs\msvs\2012\vc\atlmfc\src\mfc\afximpl.h(423): error C2065: 'LOCALE_NAME_INVARIANT' : undeclared identifier
1>e:\programs\msvs\2012\vc\atlmfc\src\mfc\afximpl.h(423): error C3861: 'CompareStringEx': identifier not foundThese are the only errors i get and all the projects in the solution are throwing them. I have updated Windows(with all the updates available) the Include Directories look like this:
$(VCInstallDir)include
$(VCInstallDir)atlmfc\include
$(WindowsSdkDir)include
$(WindowsSDK_IncludePath)
$(FrameworkSDKDir)\includeThe Library directories look like this:
$(WindowsSDK_LibraryPath_x86)
$(VCInstallDir)lib
$(VCInstallDir)atlmfc\lib
$(WindowsSdkDir)lib
$(FrameworkSDKDir)\libIf you have some ideas please share them with me. Thank you. P.S I am using Windows 7
-
I did, i am still getting the errors. Btw the Platform Toolset of each of the projects is set to Visual Studio 2012 (v110)
Have you followed the link given in that article to project settings info http://msdn.microsoft.com/en-us/library/675f1588.aspx
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.
-
The error message tells you exactly which line in afximpl.h is causing the problem, so you should go and have a look at that file to see what other dependencies it needs.
Use the best guess
Thank you. Your message really helped me the problem is solved. The reason for this thing was a stupid include of the precompiled header in a file which wasn't in the same project. That caused for the compiler to look for declaration of WINVER in the wrong place and from there the errors were thrown because of the old value taken from the last macro in the Include Directories (BCGSoft reference). You get my +5
-
Have you followed the link given in that article to project settings info http://msdn.microsoft.com/en-us/library/675f1588.aspx
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.
-
Thank you. Your message really helped me the problem is solved. The reason for this thing was a stupid include of the precompiled header in a file which wasn't in the same project. That caused for the compiler to look for declaration of WINVER in the wrong place and from there the errors were thrown because of the old value taken from the last macro in the Include Directories (BCGSoft reference). You get my +5