-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clangcl error: lld-link: error: <root>: undefined symbol: mainCRTStartup #97
Comments
@aboelens - thanks for reporting the problem. I can repro it, too - running TBH, though, running from a |
Options:
|
First of all, thank you very much for creating these tool chains. They have been very helpful.
In addition to the windows-msvc-x64 preset, I recently tried out the windows-clangcl-x64 preset in the provided example. Unfortunately it is not working for me in a Developer PowerShell for VS 2022. The windows-msvc-x64 preset works just fine in both a Developer PowerShell for VS 2022 and a x64 Native Tools Command Prompt for VS 2022. However, the windows-clangcl-x64 preset only works in the x64 Native Tools Command Prompt for VS 2022. In the PowerShell I get the error message below. I am not sure I am missing something or whether this is a bug.
Preset CMake variables:
CMAKE_CXX_COMPILER_FRONTEND_VARIANT="MSVC"
CMAKE_C_COMPILER_FRONTEND_VARIANT="MSVC"
CMAKE_SYSTEM_PROCESSOR="x64"
CMAKE_SYSTEM_VERSION="10.0.19041.0"
CMAKE_TOOLCHAIN_FILE="../Windows.Clang.toolchain.cmake"
CMAKE_VS_VERSION_PRERELEASE="ON"
CMAKE_VS_VERSION_RANGE="[16.0,18.0)"
CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM="10.0.22621.0"
-- The C compiler identification is Clang 17.0.3 with MSVC-like command-line
-- The CXX compiler identification is Clang 17.0.3 with MSVC-like command-line
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/Llvm/x64/bin/clang-cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/Llvm/x64/bin/clang-cl.exe - broken
CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
is not able to compile a simple test program.
It fails with the following output:
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:6 (project)
-- Configuring incomplete, errors occurred!
The text was updated successfully, but these errors were encountered: