I am trying to port a VC++ application which worked on VS 2003 to VS 2010.
In one of the projects, after converting to VS2010 format, while compiling I get following error in atlbase.h:-
2>C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\atlbase.h(5137):
error C2664: '__noop' : cannot convert parameter 1 from 'bool' to 'LPWSTR'
The line in question is :-
ATLENSURE(data.hEvent != NULL);
I am building for Unicode char set although I have also tried Multi-byte but in vain.
I have tried figuring this out and searching on relevant forums but no luck yet.
Any help is appreciated, please feel free to ask for more details.
EDIT
After seeing the comment below, I tried commenting this line and the error now occurs at line no 747 in atlbase.h which is
ATLASSUME( m_p == NULL );
If I comment even this then same error occurs somewhere else (in a different file in fact).
I obviously can't modify atlbase.h, Does anyonw have any idea for resolving this?
Please try to build with "no-set" option for your project and all projects it's dependent on, it could help.
Related
I am attempting to build google V8 with Visual Studio 2013 according to Building with Gyp. However, I am getting this error on practically every .vcxproj file in my solution explorer:
Error 12 error D8021: invalid numeric argument '/H,' C:\v8\tools\gyp\cl v8_base_3
According to the MSDN, "/H restricts the length of external names." and "/H is deprecated; the maximum length limits have been increased and /H is no longer needed."
I'm not sure if this is a problem with visual studio versions or if I need to remove this flag from some code somewhere. Any chance I could get some help? Thank so much
I think the error is pretty self-explanatory.
Error 12 error D8021: invalid numeric argument '/H,' C:\v8\tools\gyp\cl v8_base_3.
i.e After /H the compiler expects a numeric argument. However it encountered a comma '/H,'. Could you paste the snippets of your .vcproject file?
Did you try providing a numeric argument after '/H'?
I have strange error during building my solution. Yesterday everything was fine, but today I get this error
Picture of error from error list:
Copy/paste error from output:
fatal error CS2007: Unrecognized option: '/ruleset:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\Rule Sets\MinimumRecommendedRules.ruleset"'
Solution contains many projects, but during building all solution, only one project show this error.
Does anyone can help me?
P.S. Changing file with ruleset did not help, I had the same error (but with other file in error message). But actually, I do not want change that ruleset file.
As seen in the following link, try opening it in VS2013, turn off the ruleset, then open in 2015, and turn it back on.
src: https://social.msdn.microsoft.com/Forums/vstudio/en-US/974f66c6-debf-4a51-8463-00624e4dafa4/vs-2015-building-2013-project-could-not-find-rule-set-file-minimumrecommendedrulesruleset?forum=msbuild
I found a nice tutorial on how to implement LuaPlus into an C++ Project using Visual Studio 2010.
http://www.zynox.net/luaplus-1-compiling-basic-usage/
But I can't get it to work because of some error messages..
mainproject\main.cpp(51): error C2664: ‘GetCurrentDirectoryW’ : cannot convert parameter 2 from ‘char [260]‘ to ‘LPWSTR’
50. char pPath[ MAX_PATH ];
51. GetCurrentDirectory(MAX_PATH,pPath);
52. strcat_s(pPath,MAX_PATH,"\\test.lua");
I tried to use TCHAR instead of char, but then it says:
no instance of overloaded function “strcat_s” matches the argument list
So for testing purposes I just deleted these three lines and replaced them with a static path:
const char* pPath = "C:\\Users\\fancyBubble\\Documents\\Visual Studio 2010\\Projects\\LuaPlusTutorial\\MainProject\\test.lua";
and now I get:
fatal error LNK1104: cannot open file ‘..\Debug\LUAPlus.lib’
I'm absolutely clueless how to fix this.
I even tried to use the same version of LuaPlus that the tutorial-creator probably used, but the error messages didn't go away.
I don't really know what I did wrong, but the admin uploaded the whole solution:
http://www.zynox.net/?wpfb_dl=3
Using this combined with greatwolf's comment it works great. :)
Trying to compile this old VC++ 6.0 program in VC++ 2010. This ATL/WTL stuff is giving me lots of problems. I downloaded and have linked to the latest WTL (as far as I know) wtl71.
I am getting compile errors in atlmisc.h:
atlmisc.h(1159): error C2440: 'return' : cannot convert from 'const char *' to 'TCHAR *'
I've searched the 'net, and the answers that come up call for modifying the stock MS atlmisc.h file!
Am I missing something here? What do I need to do to get this to compile?
Most of the time I've seen that error, it's because I've been trying to build a Unicode application. In a Unicode application, the TCHAR* is a short* or wchar_t* rather than a char*.
I'd suggest checking your project settings and making sure that in the project properties, General > Character Set is set to Use Multi-Byte Character Set.
I have the following trivial file named Temp.cpp:
#include <string>
int main() { return 0; }
and I'm trying to compile it with the following command-line in the Windows XP Free Build Environment, using WDK 7.1:
cl.exe /Iinc\api\crt\stl70 /Iinc\crt C:\Temp.cpp
and I'm getting really random errors like:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.207 for 80x86
C:\WinDDK\7600.16385.1\inc\api\crt\stl70\iosfwd(202) :
error C2144: syntax error : 'int' should be preceded by ';'
The error goes away if I use stl60 instead of stl70, but that doesn't solve the problem.
What's the cause of the problem?
Update: I tried uninstalling and installing the WDK again, but nothing changed. :(
Update 2: Okay, apparently the error is screaming out at the header file itself: _SCL_INSECURE_DEPRECATE is the cause. Does anybody know how to turn it off correctly? (If I just comment out the lines, I get a ton more errors regarding a bunch of other macros.)
Found the answer myself, through modifying the headers and guess'n'checking:
I need to have _STL70_ defined.
Which cl.exe are you picking up? If your path happens to have an older (VC6) compiler before the WDK one, you'd expect these errors. VC6 can't compile the STL as shipped with VC7
apparently the error is screaming out at the header file itself: _SCL_INSECURE_DEPRECATE is the cause. Does anybody know how to turn it off correctly?
If you're having problems with _SCL_INSECURE_DEPRECATE, try setting:
/D_SCL_SECURE_NO_DEPRECATE
But given the error message you're seeing it sounds like you're the compiling headers with a a compiler that's older than the headers support (so this might not get you very far anyway).