Tag Archives: C + + based

ninja Compiling the C compiler identification source file CMakeCCompilerId.c failed

 

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed

At the same time, the console also reported an error:

— The C compiler identification is unknown
— The CXX compiler identification is unknown
— The ASM compiler identification is unknown
— Didn’t find assembler
CMake Error at CMakeLists.txt:30 (project):
  No CMAKE_ C_ COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable “CC” or the CMake cache entry CMAKE_ C_ COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.

CMake Error at CMakeLists.txt:30 (project):
  No CMAKE_ CXX_ COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable “CXX” or the CMake cache entry CMAKE_ CXX_ COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

resolvent:

one

“C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\ vcvarsall.bat ” x64

two

“C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ vcvarsall.bat ” x64

 

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.
Compiler: CMAKE_ C_ COMPILER-NOTFOUND 
Build flags: 
Id flags:  

The output was:
the system cannot find the specified file.

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.
Compiler: CMAKE_ C_ COMPILER-NOTFOUND 
Build flags: 
Id flags: -c 

The output was:
the system cannot find the specified file.

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.
Compiler: CMAKE_ C_ COMPILER-NOTFOUND 
Build flags: 
Id flags: -Aa 

The output was:
the system cannot find the specified file.

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.
Compiler: CMAKE_ C_ COMPILER-NOTFOUND 
Build flags: 
Id flags: -D__ CLASSIC_ C__  

The output was:
the system cannot find the specified file.

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.
Compiler: CMAKE_ C_ COMPILER-NOTFOUND 
Build flags: 
Id flags: –target=arm-arm-none-eabi;-mcpu=cortex-m3 

The output was:
the system cannot find the specified file.

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.
Compiler: CMAKE_ C_ COMPILER-NOTFOUND 
Build flags: 
Id flags:  

The output was:
the system cannot find the specified file.

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.
Compiler: CMAKE_ C_ COMPILER-NOTFOUND 
Build flags: 
Id flags: -c 

The output was:
the system cannot find the specified file.

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.
Compiler: CMAKE_ C_ COMPILER-NOTFOUND 
Build flags: 
Id flags: -Aa 

The output was:
the system cannot find the specified file.

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.
Compiler: CMAKE_ C_ COMPILER-NOTFOUND 
Build flags: 
Id flags: -D__ CLASSIC_ C__  

The output was:
the system cannot find the specified file.

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.
Compiler: CMAKE_ C_ COMPILER-NOTFOUND 
Build flags: 
Id flags: –target=arm-arm-none-eabi;-mcpu=cortex-m3 

The output was:
the system cannot find the specified file.

Compiling the CXX compiler identification source file ” CMakeCXXCompilerId.cpp ” failed.
Compiler: CMAKE_ CXX_ COMPILER-NOTFOUND 
Build flags: 
Id flags:  

The output was:
the system cannot find the specified file.

Compiling the CXX compiler identification source file ” CMakeCXXCompilerId.cpp ” failed.
Compiler: CMAKE_ CXX_ COMPILER-NOTFOUND 
Build flags: 
Id flags: -c 

The output was:
the system cannot find the specified file.

Compiling the CXX compiler identification source file ” CMakeCXXCompilerId.cpp ” failed.
Compiler: CMAKE_ CXX_ COMPILER-NOTFOUND 
Build flags: 
Id flags: –c++ 

The output was:
the system cannot find the specified file.

Compiling the CXX compiler identification source file ” CMakeCXXCompilerId.cpp ” failed.
Compiler: CMAKE_ CXX_ COMPILER-NOTFOUND 
Build flags: 
Id flags: –ec++ 

The output was:
the system cannot find the specified file.

Compiling the CXX compiler identification source file ” CMakeCXXCompilerId.cpp ” failed.
Compiler: CMAKE_ CXX_ COMPILER-NOTFOUND 
Build flags: 
Id flags: –target=arm-arm-none-eabi;-mcpu=cortex-m3 

The output was:
the system cannot find the specified file.

Compiling the CXX compiler identification source file ” CMakeCXXCompilerId.cpp ” failed.
Compiler: CMAKE_ CXX_ COMPILER-NOTFOUND 
Build flags: 
Id flags:  

The output was:
the system cannot find the specified file.

Compiling the CXX compiler identification source file ” CMakeCXXCompilerId.cpp ” failed.
Compiler: CMAKE_ CXX_ COMPILER-NOTFOUND 
Build flags: 
Id flags: -c 

The output was:
the system cannot find the specified file.

Compiling the CXX compiler identification source file ” CMakeCXXCompilerId.cpp ” failed.
Compiler: CMAKE_ CXX_ COMPILER-NOTFOUND 
Build flags: 
Id flags: –c++ 

The output was:
the system cannot find the specified file.

Compiling the CXX compiler identification source file ” CMakeCXXCompilerId.cpp ” failed.
Compiler: CMAKE_ CXX_ COMPILER-NOTFOUND 
Build flags: 
Id flags: –ec++ 

The output was:
the system cannot find the specified file.

Compiling the CXX compiler identification source file ” CMakeCXXCompilerId.cpp ” failed.
Compiler: CMAKE_ CXX_ COMPILER-NOTFOUND 
Build flags: 
Id flags: –target=arm-arm-none-eabi;-mcpu=cortex-m3 

The output was:
the system cannot find the specified file.

Expected unqualified ID before numeric constant

Today, when the library was compiled, the problem emerged with unqualified-id before numeric Constant, as the variable is repeatedly defined, with the same name as the macro definition, and the following pattern:

a header file defines an interface body,

struct {

int Size;

}

then define the macro in another file as follows:

define Size

At this time will appear above error, really need to use the common custom naming principles, or really hard to check.

Today, when the library was compiled, the problem emerged with unqualified-id before numeric Constant, as the variable is repeatedly defined, with the same name as the macro definition, and the following pattern:
A header file defines an interface body,
The class XXXClass {
Const static int MAX_PATTERN_NUM = 1024;
}
 
Then define the macro in another file as follows:
# define MAX_PATTERN_NUM 100
 
This is where the above error occurs