Building Google V8 with Visual Studio - c++

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'?

Related

Is there any way to force visual studio to show me location of an error in *my* code, instead of pointing to the standard library?

I have a small piece of code that does not compile
Visual Studio shows me this error and points to xhash:
Error C2064 term does not evaluate to a function taking 1 arguments C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xhash 114
I know that error is somewhere in my code, probably related to unordered map, so template does not resolve. I'm wondering if there's a way to see which part of my code causes compilation error
The full build output will have many more lines, in the form ".. Instantiated from here...". Typically the last of these lines will point to your faulty code, possibly more if you wrote a template yourself.

Visual Studio 2019 "C1001 internal compiler error" only in Release

I'm getting a C1001 error while attempting to build in Visual Studio 2019 Version 16.7.2. This is a C++ project that has previously built fine until a change set I am attempting to build today.
The exact error is as follows: (with project specific path redacted)
1>d:\work\[...](82): fatal error C1001: An internal error has occurred in the compiler.
1>(compiler file 'd:\agent\_work\3\s\src\vctools\compiler\utc\src\p2\main.c', line 187)
Notes below:
The error only happens in Release. Debug builds and runs.
If I turn off all optimizations in Release the error goes away.
The location where the error occurs seems to be unrelated to recent changes I have made to the project i.e. VS is reporting the error in a translation unit that had been building without problem until unrelated changes in another TU were made.
The location where the error occurs seems to not actually be problematic in the sense that if I comment out the implementation of the function there and just return a default value from the function so that the program is syntactically correct, the error occurs in the next the function in the same file.
Turning off Whole Program Optimization and Link Time Code Generation does not fix the problem.
SUGGESTIONS
Please:
Update your post with exact error text (if available)
Post your question to https://developercommunity.visualstudio.com/ as well
See if any of these links are applicable:
https://developercommunity.visualstudio.com/content/problem/710576/visual-studio-2019-1622-fatal-error-c1001-in-32-bi.html
https://social.msdn.microsoft.com/Forums/vstudio/en-US/165975b4-35e9-4b40-9524-e656a4e2f359/fatal-error-c1001-an-internal-error-has-occurred-in-the-compiler?forum=visualstudiogeneral
https://developercommunity.visualstudio.com/content/problem/664162/ice-on-valid-code-after-upgrading-to-1620.html
One way to notify Microsoft Support like this:
MSVS > Help > Send Feedback > Report a Problem
Here is a complete list of MSVS support options: https://visualstudio.microsoft.com/vs/support/
Update:
Thank you for copying/pasting the exact error message:
1>d:\work\[...](82): fatal error C1001: An internal error has occurred in the compiler.
1>(compiler file 'd:\agent\_work\3\s\src\vctools\compiler\utc\src\p2\main.c', line 187)
This is the MSVS file causing the error C1001: vctools\compiler\utc\src\p2\main.c
This is an existing Microsoft trouble report:
https://developercommunity.visualstudio.com/content/problem/210332/c1001-internal-error-compiler-file-fddvctoolscompi.html
Hi Roger,
Thanks for reporting the bug, and including an excellently
self-contained repro, so quickly. I've investigated and this seems to
be the same issue as
https://developercommunity.visualstudio.com/content/problem/209359/ice-with-fpfast-in-156-and-msvc-daily-1413263051-p.html.
I'm closing this as a duplicate just so that people can collect
context and work-around advice in the same location, and when the
other bug is marked fixed, you can assume that this one is too.
Thanks again,
Aaron Gorenstein
Software Engineer II
Searching for this error message/source module, I also found this: https://stackoverflow.com/a/63435683/421195
Please post back if either of these work for you!

Visual studio doesn't compile

Last friday everything worked perfect. But on Monday I got this error message in Visual Studio.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(147,5): error MSB6006: "CL.exe" exited with code -1.
Doesn't matter what I do that I always get same error. I've repaired VS , uninstalled VS , changed the SDK , the plugins.. everything. If I execute cl.exe manually I dont get any error.
Have found this thread:
http://connect.microsoft.com/VisualStudio/feedback/details/724154/error-msb6006-cl-exe-exited-with-code-1073741819
I thought It was written by me! but there's no solution inside it.
Thanks.
The important parts of this message are:
CL.EXE : This means the error occurs during a compilation step. It's not a pre-build step.
Code -1 : This means the error is not the same as the one you linked (which was -1073741819).
The first thing to do is figuring out when it fails. What file is being compiled? Create the default "Hello, World" project and compile that. If it works: problem is input dependent. If not: what's the problematic input? Can you compile a single file of your project? If you can't find any, pick one and turn on "pre-processing only". Does it at least pass the pre-processor phase? Turn on LTCG. (link-time code generation, CL won't create x86 code). Does it work now?

Compilation error when using LuaPlus

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. :)

atlbase.h compiler error :- cannot convert parameter from 'bool' to 'LPWSTR'

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.