nmake to make sth but occurs 'too many names to left of '='' - nmake

i try to use nmake to make grbl source code. https://github.com/grbl/grbl But it occurs a syntax error: 'too many names to left of '=''. What's wrong with it.

Related

Got problems with Intero. (or Haskero)

When I put on mouse on phrases, intero says "Couldn't guess that module name. Does it exists". It whines on function name, module name, every word of string, and even space or tab character.
It does not cause fatal error or stop compiling, but it's irritating. How can I solve this?
I am using Stack, Haskero on VS Code. I also tried stack ghci --with-ghc-intero, but it doesn't work. How can I solve this?

Visual Studio 2012 Error List is wrong

So I have a solution that compiles and runs fine.
But the Error List window is always maxed out
(Last line in window: "Maximum number of errors has been exceeded.")
And they're totally crazy error messages like:
'End Function' must be preceded by a matching 'Function'
'Try' must end with a matching 'End Try'
'If' must end with a matching 'End If'
'Catch' cannot appear outside a 'Try' statement.
Statement cannot appear within a method body. End of method assumed
When I double click any of the errors, it just takes me to the first line of my class file.
I might not be the best developer in the world, but I'm not making mistakes like the Error List window says I am!
I copy/pasted the entire class file to notepad, save the text file, closed the text file, opened the text file and copy/pasted back into the class file...no more crazy Error List.
After I went through this process, I found out that you can choose "Save As" from VS, and there is a little arrow next to the Save button that lets you set the encoding.
So I'm guessing it was an encoding thing...the original class file has been in the project since Visual Studio 2003...no issues until VS2012...go figure!
Thanks everyone!
This started happening to me after reinstalling my system.
I think GoDogGo's solution of changing the file encoding is probably valid (I found I had a mixture of different encodings at work). Intellisense was showing errors that didn't match up to the right character positions in my source files.
I also had issues with types not being recognised, such as 'Data.DataTable'. I found I had included an un-encoded ampersand in the value of a web.config appSetting entry (it was part of a folder path). I think the compiler probably knew about it but didn't include it in the visible list of errors in the IDE's error list.
Once I had corrected the ampersand encoding and rebuilt, all the other errors disappeared.

cl.exe: LNK1104: cannot open file - and I'm not even telling it to link

I am compiling several C++ sources using cl.exe (Visual Studio 2010 Express). The sources are compiling fine and it generates the respective obj files, but after the last line of "Generating code..." it throws the infamous LNK1104 error, but of the weirdest kind I have ever seen:
Generating Code...
LINK : fatal error LNK1104: cannot open file 'Color.exe'
Now, Color.exe does not exist, I do not want it to exist, I am not telling cl to create it, neither do I even tell it to link at all, I only want to compile. Color.obj happens to be the first output file of the compiler (alphabetical order), so I assume this problem is kinda linked to it.
The command line of my cl.exe invocation looks like follows (I trimmed the includes, they aren't part of the problem):
cl /nologo /Ox /EHsc /I[...] "D:\Projects\Java\JSFML\src\cpp\Intercom\*.cpp" "D:\Projects\Java\JSFML\src\cpp\JNI\*.cpp" /FoD:\Projects\Java\JSFML\out\obj\
The working directory is the MS Visual Studio directory. I assume that it cannot "open" Color.exe because it cannot write in that directory. However, my question is: why would cl even want to create it? I'm not telling it to link?
The default of most (if not all) C/C++ compilers is to perform the linking step unless you explicitly tell them not to.
If you take a look at this page which covers "cl.exe", you'll find an option, /c (compile only, no link) that will turn that behavior off for you.
You are telling it to link. If you don't want to link, use the /c option (for compile-only).

MSVC++ Preprocessor - How do I output a define's value with a compiler macro?

I tried
#error MY_DEFINE
But all that did is echo "MY_DEFINE" when it threw the error.
Thanks!
You can tell the compiler to save the preprocessor output (/E or /EP) and then look at that file. That's usually how I debug problems related to macro expansion.
If you're trying to make some cool error facility for a library, you might be out of luck. I think you'll have a hard time getting the preprocessor to expand a macro into a compile-time message. Perhaps if you combined a template trick that used the macro, you could get it to appear in a cryptic compiler error message.

Visual C++ Unicode String Literal is giving error: 'L': undeclared identifier

I'm working on getting a Visual C++ 2005 solution to compile in unicode. However, In some of my projects (but not all), I get errors in the form:
1>.\CBitFlags.cpp(25) : error C2065: 'L' : undeclared identifier
and the line of code in question is:
LOGERROR(UTILITY, L"Tried to use object to store %d flags, when max is %d",
I am BAFFLED. It seems to be treating L as an identifier when L is part of the language syntax. Does anyone know if there is some flag somewhere that has to be enabled in the project or compile settings that if not toggled would cause this? The really weird part is it isn't all of the occurrences of this, it's only some of them. It does seem to be consistent within a single project, but I have entire projects compiling fine, and others that fail miserably like this.
The problem is almost certainly inside of the LOGERROR macro. Look at how it treats that second paramater. Expand the macro yourself, it is easy to overlook small errors in macros sometimes.
Visual C++ 2005 does support the L syntax for wide strings, and doesn't need any special flags or anything to support it. So most likely, your problem is elsewhere. Perhaps the definition of LOGERROR or UTILITY. Or a missing semicolon previously, or.... It could be anything which causes the compiler to expect something other than a string literal when it gets to the L.
Since this appears to be something used in a macro, I think you should look at the definition of the LOGERROR and UTILITY macros and at what they expands to in the context of your code. Use the /P compiler option to preprocess your files without proceeding to the compilation step, and then look at the result to see what the compiler's really seeing.
I can reproduce the error you see if I have a space after the L:
wchar_t const* foo = L "foo";
Are you sure you've copied and pasted the actual code that's giving you trouble?

Resources