How to fix this error : searching for unused variables given on the command line. -- The C compiler identification is unknown CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE): No CMAKE_C_COMPILER could be found. Tell CMake w

Jude Oyedele 0 Reputation points
2023-06-29T14:08:34.6933333+00:00

I have Visual Studio 2022 installed and I have set environmental variables for C compiler but I still get the error ;
How do I locate the CMakeLists.txt file to amend line 3 as thats where the error is coming from?

 searching for unused variables given on the command line.
      -- The C compiler identification is unknown
      CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
        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.

Developer technologies Visual Studio Other
Community Center Not monitored
{count} votes

2 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,436 Reputation points Microsoft External Staff
    2023-06-30T09:58:26.6666667+00:00

    Hello @Jude Oyedele ,

    Welcome to Microsoft Q&A forum.

    Does installing a new Windows SDK work(VS Installer => Modify => Individual components => SDKs, libraries, and frameworks)?

    Besides, does this issue also appear on a newly created CMake project in Visual Studio? If it is reproducible, please share us the detailed steps to reproduce it and check further.

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Jude Oyedele 0 Reputation points
    2023-06-30T10:05:44.4433333+00:00

    What later works was running the intended installation command, which is pip install langflow via the x64 Native tool Command Prompt for VScode.
    It successfully built the wheel for llama-cpp-python which was the initial cause of the error.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.