chalet
chalet copied to clipboard
Clang detection on Windows
This is a quality-of-life thing, but I think it would be nice if Chalet could pick up on both or either of clang.exe and clang-cl.exe from the Visual Studio install folder if Clang has been installed through the Visual Studio Installer. When using the VSCode CMake extension, these are detected as:
{
"name": "Clang 12.0.0 (GNU CLI) for MSVC 17.0.32112.339 (Visual Studio Community 2022 Release - amd64)",
"visualStudio": "9989c3a4",
"visualStudioArchitecture": "amd64",
"compilers": {
"C": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\Llvm\\x64\\bin\\clang.exe",
"CXX": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\Llvm\\x64\\bin\\clang.exe"
}
},
{
"name": "Clang 12.0.0 (GNU CLI) for MSVC 17.0.32112.339 (Visual Studio Community 2022 Release - x86)",
"visualStudio": "9989c3a4",
"visualStudioArchitecture": "x86",
"compilers": {
"C": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\Llvm\\bin\\clang.exe",
"CXX": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\Llvm\\bin\\clang.exe"
}
},
{
"name": "Clang 12.0.0 (MSVC CLI) for MSVC 17.0.32112.339 (Visual Studio Community 2022 Release - amd64)",
"visualStudio": "9989c3a4",
"visualStudioArchitecture": "amd64",
"compilers": {
"C": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\Llvm\\x64\\bin\\clang-cl.exe",
"CXX": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\Llvm\\x64\\bin\\clang-cl.exe"
}
},
{
"name": "Clang 12.0.0 (MSVC CLI) for MSVC 17.0.32112.339 (Visual Studio Community 2022 Release - x86)",
"visualStudio": "9989c3a4",
"visualStudioArchitecture": "x86",
"compilers": {
"C": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\Llvm\\bin\\clang-cl.exe",
"CXX": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\Llvm\\bin\\clang-cl.exe"
}
},
Without any manual work required by the developer.
What do you think? Is this something that Chalet can support?
Definitely doable, but I'll have to dig into this one. It would probably have to be a new preset (vs-llvm or something), since the VS environment has to be created with vcvars before the toolchain is generated.
@bitsauce Decided to add this in the latest patch release since it was pretty straightforward. You can try it out in v0.5.9.
Use the llvm-vs-2022 and llvm-vs-2019 presets. They can use the same target architctures as MSVC -- x86_64 / x64, i686 / x86, arm, arm64 assuming you have the build tools installed. The Profile configuration doesn't work with it currently -- same with the regular llvm preset on Windows. Your mileage will vary with any CMake targets, but let me know if you notice anything that I can change/add!
Thanks @rewrking! I tested it on my computer, and chalet was able to find the clang installation with no issue.
Didn't manage to get the SDL example running yet (produces linker errors). Not sure why yet, although one thing I noticed is that chalet compiles with the -MD -MT flags, which seems a little bit suspicious to me. Might try some more this weekend.
Hmmm, that's odd actually. The SDL example builds fine on my machine. This is the link command that generates for me (I'm using ninja during the build):
"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/x64/bin/clang++.exe" -target x86_64-pc-windows-msvc -Wl,/subsystem:windows -Wl,/entry:mainCRTStartup -L"build/x86_64-pc-windows-msvc_Release/chalet_external/sdl2" -L"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/llvm/x64/lib" -L"build/x86_64-pc-windows-msvc_Release" -o "build/x86_64-pc-windows-msvc_Release/sdl2-app.exe" build/x86_64-pc-windows-msvc_Release/obj.sdl2-app/src/Main.cpp.obj build/x86_64-pc-windows-msvc_Release/obj.sdl2-app/build/int.sdl2-app/manifest.rc.res -lSDL2 -ldbghelp -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
-MT specifies the output dependency file to generate in compile commands
-MD just tells the compiler to write the dep file.
They're the same in GCC & all versions of clang as far as I know. What are the linker errors you're getting? And is this the current version of chalet-example-sdl2 or an older version?
Did some further testing just now. Seems that it does, in fact, build successfully in Release mode (most recent commit in chalet-example-sdl2).
However, in Debug, I get the following:
chalet build log
PS F:\Git\chalet\chalet-example-sdl2> chalet build -t llvm-vs-2022 -b ninja -c Debug
> Reading Environment [.env.windows] ... done
> Reading Build File [chalet.json] ... done (6ms)
¬ Fetching: libsdl-org/SDL (release-2.24.0)
> Creating Microsoft (R) Visual C/C++ Environment Cache ... done (1.315s)
> Configuring build ... done (1ms)
> C++ Compiler: LLVM Clang version 14.0.5 (VS 17.3.32922.545)
> Target Architecture: x86_64-pc-windows-msvc
> Strategy: Ninja
> Configuration: Debug
» Build: sdl2
Not searching for unused variables given on the command line.
-- The C compiler identification is Clang 14.0.5 with GNU-like command-line
-- The CXX compiler identification is Clang 14.0.5 with GNU-like command-line
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/x64/bin/clang.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/x64/bin/clang++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Performing Test HAVE_GCC_WALL
-- Performing Test HAVE_GCC_WALL - Success
-- Performing Test HAVE_GCC_NO_STRICT_ALIASING
-- Performing Test HAVE_GCC_NO_STRICT_ALIASING - Success
-- Performing Test HAVE_GCC_WDECLARATION_AFTER_STATEMENT
-- Performing Test HAVE_GCC_WDECLARATION_AFTER_STATEMENT - Success
-- Performing Test HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT
-- Performing Test HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT - Success
-- Performing Test HAVE_GCC_ATOMICS
-- Performing Test HAVE_GCC_ATOMICS - Success
-- Performing Test HAVE_GCC_PREFERRED_STACK_BOUNDARY
-- Performing Test HAVE_GCC_PREFERRED_STACK_BOUNDARY - Failed
-- Performing Test HAVE_GCC_FVISIBILITY
-- Performing Test HAVE_GCC_FVISIBILITY - Failed
-- Performing Test HAVE_GCC_WSHADOW
-- Performing Test HAVE_GCC_WSHADOW - Success
-- Performing Test HAVE_NO_UNDEFINED
-- Performing Test HAVE_NO_UNDEFINED - Success
-- Performing Test HAVE_MMX
-- Performing Test HAVE_MMX - Success
-- Performing Test HAVE_3DNOW
-- Performing Test HAVE_3DNOW - Success
-- Performing Test HAVE_SSE
-- Performing Test HAVE_SSE - Success
-- Performing Test HAVE_SSE2
-- Performing Test HAVE_SSE2 - Success
-- Performing Test HAVE_SSE3
-- Performing Test HAVE_SSE3 - Success
-- Looking for immintrin.h
-- Looking for immintrin.h - found
-- Performing Test HAVE_ALTIVEC_H_HDR
-- Performing Test HAVE_ALTIVEC_H_HDR - Failed
-- Performing Test HAVE_ALTIVEC
-- Performing Test HAVE_ALTIVEC - Failed
-- Performing Test HAVE_WIN32_CC
-- Performing Test HAVE_WIN32_CC - Success
-- Looking for d3d9.h
-- Looking for d3d9.h - found
-- Looking for d3d11_1.h
-- Looking for d3d11_1.h - found
-- Performing Test HAVE_D3D12_H
-- Performing Test HAVE_D3D12_H - Failed
-- Looking for ddraw.h
-- Looking for ddraw.h - found
-- Looking for dsound.h
-- Looking for dsound.h - found
-- Looking for dinput.h
-- Looking for dinput.h - found
-- Looking for dxgi.h
-- Looking for dxgi.h - found
-- Performing Test HAVE_XINPUT_H
-- Performing Test HAVE_XINPUT_H - Success
-- Performing Test HAVE_XINPUT_GAMEPAD_EX
-- Performing Test HAVE_XINPUT_GAMEPAD_EX - Failed
-- Performing Test HAVE_XINPUT_STATE_EX
-- Performing Test HAVE_XINPUT_STATE_EX - Failed
-- Performing Test HAVE_WINDOWS_GAMING_INPUT_H
-- Performing Test HAVE_WINDOWS_GAMING_INPUT_H - Success
-- Looking for tpcshrd.h
-- Looking for tpcshrd.h - found
-- Looking for roapi.h
-- Looking for roapi.h - found
-- Looking for mmdeviceapi.h
-- Looking for mmdeviceapi.h - found
-- Looking for audioclient.h
-- Looking for audioclient.h - found
-- Looking for sensorsapi.h
-- Looking for sensorsapi.h - found
-- Looking for shellscalingapi.h
-- Looking for shellscalingapi.h - found
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.34.1.windows.1")
--
-- SDL2 was configured with the following options:
--
-- Platform: Windows-10.0.22000
-- 64-bit: TRUE
-- Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/x64/bin/clang.exe
-- Revision: https://github.com/chalet-org/chalet-example-sdl2@929b43e7fdfcad720555e4977ddb15d7ce5cb03a
--
-- Subsystems:
-- Atomic: ON
-- Audio: ON
-- Video: ON
-- Render: ON
-- Events: ON
-- Joystick: ON
-- Haptic: ON
-- Hidapi: ON
-- Power: ON
-- Threads: ON
-- Timers: ON
-- File: ON
-- Loadso: ON
-- CPUinfo: ON
-- Filesystem: ON
-- Sensor: ON
-- Locale: ON
-- Misc: ON
--
-- Options:
-- SDL2_DISABLE_INSTALL (Wanted: OFF): OFF
-- SDL2_DISABLE_SDL2MAIN (Wanted: OFF): OFF
-- SDL2_DISABLE_UNINSTALL (Wanted: OFF): OFF
-- SDL_3DNOW (Wanted: ON): ON
-- SDL_ALSA (Wanted: OFF): OFF
-- SDL_ALSA_SHARED (Wanted: OFF): OFF
-- SDL_ALTIVEC (Wanted: ON): OFF
-- SDL_ARMNEON (Wanted: OFF): OFF
-- SDL_ARMSIMD (Wanted: OFF): OFF
-- SDL_ARTS (Wanted: OFF): OFF
-- SDL_ARTS_SHARED (Wanted: OFF): OFF
-- SDL_ASAN (Wanted: OFF): OFF
-- SDL_ASSEMBLY (Wanted: ON): ON
-- SDL_ASSERTIONS (Wanted: auto): auto
-- SDL_BACKGROUNDING_SIGNAL (Wanted: OFF): OFF
-- SDL_CLOCK_GETTIME (Wanted: OFF): OFF
-- SDL_COCOA (Wanted: OFF): OFF
-- SDL_DIRECTFB (Wanted: OFF): OFF
-- SDL_DIRECTFB_SHARED (Wanted: OFF): OFF
-- SDL_DIRECTX (Wanted: ON): ON
-- SDL_DISKAUDIO (Wanted: ON): ON
-- SDL_DUMMYAUDIO (Wanted: ON): ON
-- SDL_DUMMYVIDEO (Wanted: ON): ON
-- SDL_ESD (Wanted: OFF): OFF
-- SDL_ESD_SHARED (Wanted: OFF): OFF
-- SDL_FOREGROUNDING_SIGNAL (Wanted: OFF): OFF
-- SDL_FUSIONSOUND (Wanted: OFF): OFF
-- SDL_FUSIONSOUND_SHARED (Wanted: OFF): OFF
-- SDL_GCC_ATOMICS (Wanted: ON): ON
-- SDL_HIDAPI (Wanted: ON): ON
-- SDL_HIDAPI_JOYSTICK (Wanted: ON): ON
-- SDL_HIDAPI_LIBUSB (Wanted: OFF): OFF
-- SDL_INSTALL_TESTS (Wanted: OFF): OFF
-- SDL_JACK (Wanted: OFF): OFF
-- SDL_JACK_SHARED (Wanted: OFF): OFF
-- SDL_KMSDRM (Wanted: OFF): OFF
-- SDL_KMSDRM_SHARED (Wanted: OFF): OFF
-- SDL_LIBC (Wanted: OFF): OFF
-- SDL_LIBSAMPLERATE (Wanted: OFF): OFF
-- SDL_LIBSAMPLERATE_SHARED (Wanted: OFF): OFF
-- SDL_METAL (Wanted: OFF): OFF
-- SDL_MMX (Wanted: ON): ON
-- SDL_NAS (Wanted: OFF): OFF
-- SDL_NAS_SHARED (Wanted: OFF): OFF
-- SDL_OFFSCREEN (Wanted: OFF): OFF
-- SDL_OPENGL (Wanted: ON): ON
-- SDL_OPENGLES (Wanted: ON): ON
-- SDL_OSS (Wanted: OFF): OFF
-- SDL_PIPEWIRE (Wanted: OFF): OFF
-- SDL_PIPEWIRE_SHARED (Wanted: OFF): OFF
-- SDL_PTHREADS (Wanted: OFF): OFF
-- SDL_PTHREADS_SEM (Wanted: OFF): OFF
-- SDL_PULSEAUDIO (Wanted: OFF): OFF
-- SDL_PULSEAUDIO_SHARED (Wanted: OFF): OFF
-- SDL_RENDER_D3D (Wanted: ON): ON
-- SDL_RENDER_METAL (Wanted: OFF): OFF
-- SDL_RPATH (Wanted: OFF): OFF
-- SDL_RPI (Wanted: OFF): OFF
-- SDL_SNDIO (Wanted: OFF): OFF
-- SDL_SNDIO_SHARED (Wanted: OFF): OFF
-- SDL_SSE (Wanted: ON): ON
-- SDL_SSE2 (Wanted: ON): ON
-- SDL_SSE3 (Wanted: ON): ON
-- SDL_SSEMATH (Wanted: ON): ON
-- SDL_STATIC_PIC (Wanted: OFF): OFF
-- SDL_TESTS (Wanted: OFF): OFF
-- SDL_VIRTUAL_JOYSTICK (Wanted: ON): ON
-- SDL_VIVANTE (Wanted: OFF): OFF
-- SDL_VULKAN (Wanted: ON): ON
-- SDL_WASAPI (Wanted: ON): ON
-- SDL_WAYLAND (Wanted: OFF): OFF
-- SDL_WAYLAND_LIBDECOR (Wanted: OFF): OFF
-- SDL_WAYLAND_LIBDECOR_SHARED (Wanted: OFF): OFF
-- SDL_WAYLAND_QT_TOUCH (Wanted: OFF): OFF
-- SDL_WAYLAND_SHARED (Wanted: OFF): OFF
-- SDL_X11 (Wanted: OFF): OFF
-- SDL_X11_SHARED (Wanted: OFF): OFF
-- SDL_X11_XCURSOR (Wanted: OFF): OFF
-- SDL_X11_XDBE (Wanted: OFF): OFF
-- SDL_X11_XFIXES (Wanted: OFF): OFF
-- SDL_X11_XINPUT (Wanted: OFF): OFF
-- SDL_X11_XRANDR (Wanted: OFF): OFF
-- SDL_X11_XSCRNSAVER (Wanted: OFF): OFF
-- SDL_X11_XSHAPE (Wanted: OFF): OFF
-- SDL_XINPUT (Wanted: ON): ON
--
-- CMAKE_C_FLAGS_DEBUG: -g -Xclang -gcodeview -O0 -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd
-- CMAKE_CXX_FLAGS_DEBUG: -g -Xclang -gcodeview -O0 -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd
--
-- CFLAGS: -idirafter "F:/Git/chalet/chalet-example-sdl2/chalet_external/sdl2/src/video/khronos"
-- EXTRA_CFLAGS: -Wall -fno-strict-aliasing -Werror=declaration-after-statement -Wdeclaration-after-statement -Wshadow -fcolor-diagnostics -mmmx -m3dnow -msse -msse2 -msse3
-- EXTRA_LDFLAGS:
-- EXTRA_LIBS: user32;gdi32;winmm;imm32;ole32;oleaut32;version;uuid;advapi32;setupapi;shell32;dinput8
--
-- Build Shared Library: ON
-- Build Static Library: OFF
--
-- Configuring done
-- Generating done
-- Build files have been written to: F:/Git/chalet/chalet-example-sdl2/build/x86_64-pc-windows-msvc_Debug/chalet_external/sdl2
[1/281] Generating include/SDL_assert.h
[2/281] Generating include/SDL_copying.h
[3/281] Generating include/SDL_cpuinfo.h
[4/281] Generating include/SDL_clipboard.h
[5/281] Generating include/SDL_bits.h
[6/281] Generating include/SDL_atomic.h
[7/281] Generating include/SDL_blendmode.h
[8/281] Generating include/SDL_audio.h
[9/281] Generating include/SDL.h
[10/281] Generating include/SDL_guid.h
[11/281] Generating include/SDL_haptic.h
[12/281] Generating include/SDL_endian.h
[13/281] Generating include/SDL_events.h
[14/281] Generating include/SDL_error.h
[15/281] Generating include/SDL_egl.h
[16/281] Generating include/SDL_gesture.h
[17/281] Generating include/SDL_filesystem.h
[18/281] Generating include/SDL_gamecontroller.h
[19/281] Generating include/SDL_main.h
[20/281] Generating include/SDL_loadso.h
[21/281] Generating include/SDL_joystick.h
[22/281] Generating include/SDL_keyboard.h
[23/281] Generating include/SDL_keycode.h
[24/281] Generating include/SDL_hints.h
[25/281] Generating include/SDL_log.h
[26/281] Generating include/SDL_hidapi.h
[27/281] Generating include/SDL_locale.h
[28/281] Generating include/SDL_mutex.h
[29/281] Generating include/SDL_metal.h
[30/281] Generating include/SDL_misc.h
[31/281] Generating include/SDL_messagebox.h
[32/281] Generating include/SDL_mouse.h
[33/281] Generating include/SDL_opengl.h
[34/281] Generating include/SDL_opengl_glext.h
[35/281] Generating include/SDL_name.h
[36/281] Generating include/SDL_opengles.h
[37/281] Generating include/SDL_power.h
[38/281] Generating include/SDL_opengles2.h
[39/281] Generating include/SDL_opengles2_gl2platform.h
[40/281] Generating include/SDL_pixels.h
[41/281] Generating include/SDL_platform.h
[42/281] Generating include/SDL_opengles2_gl2.h
[43/281] Generating include/SDL_opengles2_gl2ext.h
[44/281] Generating include/SDL_opengles2_khrplatform.h
[45/281] Generating include/SDL_quit.h
[46/281] Generating include/SDL_system.h
[47/281] Generating include/SDL_surface.h
[48/281] Generating include/SDL_rect.h
[49/281] Generating include/SDL_rwops.h
[50/281] Generating include/SDL_scancode.h
[51/281] Generating include/SDL_shape.h
[52/281] Generating include/SDL_stdinc.h
[53/281] Generating include/SDL_render.h
[54/281] Generating include/SDL_sensor.h
[55/281] Generating include/SDL_syswm.h
[56/281] Generating include/SDL_test.h
[57/281] Generating include/SDL_test_compare.h
[58/281] Generating include/SDL_test_harness.h
[59/281] Generating include/SDL_test_images.h
[60/281] Generating include/SDL_test_common.h
[61/281] Generating include/SDL_test_crc32.h
[62/281] Generating include/SDL_test_font.h
[63/281] Generating include/SDL_test_assert.h
[64/281] Generating include/SDL_test_log.h
[65/281] Generating include/SDL_timer.h
[66/281] Generating include/SDL_thread.h
[67/281] Generating include/SDL_test_memory.h
[68/281] Generating include/SDL_test_fuzzer.h
[69/281] Generating include/SDL_test_md5.h
[70/281] Generating include/SDL_types.h
[71/281] Generating include/SDL_test_random.h
[72/281] Generating include/SDL_video.h
[73/281] Generating include/SDL_touch.h
[74/281] Generating include/SDL_version.h
[75/281] Generating include/close_code.h
[76/281] Generating include/begin_code.h
[77/281] Generating include/SDL_vulkan.h
[78/281] Building C object CMakeFiles/SDL2.dir/src/SDL_utils.c.obj
[79/281] Building C object CMakeFiles/SDL2.dir/src/SDL_guid.c.obj
[80/281] Building C object CMakeFiles/SDL2.dir/src/SDL_error.c.obj
[81/281] Building C object CMakeFiles/SDL2.dir/src/SDL_hints.c.obj
[82/281] Building C object CMakeFiles/SDL2.dir/src/audio/SDL_audiodev.c.obj
[83/281] Building C object CMakeFiles/SDL2.dir/src/atomic/SDL_atomic.c.obj
[84/281] Building C object CMakeFiles/SDL2.dir/src/audio/SDL_audiotypecvt.c.obj
[85/281] Building C object CMakeFiles/SDL2.dir/src/audio/SDL_mixer.c.obj
[86/281] Building C object CMakeFiles/SDL2.dir/src/audio/SDL_wave.c.obj
[87/281] Building C object CMakeFiles/SDL2.dir/src/SDL_list.c.obj
[88/281] Building C object CMakeFiles/SDL2.dir/src/SDL_dataqueue.c.obj
[89/281] Building C object CMakeFiles/SDL2.dir/src/atomic/SDL_spinlock.c.obj
[90/281] Building C object CMakeFiles/SDL2.dir/src/SDL_log.c.obj
[91/281] Building C object CMakeFiles/SDL2main.dir/src/main/windows/SDL_windows_main.c.obj
[92/281] Building C object CMakeFiles/SDL2.dir/src/SDL_assert.c.obj
[93/281] Building C object CMakeFiles/SDL2.dir/src/audio/SDL_audiocvt.c.obj
[94/281] Building C object CMakeFiles/SDL2.dir/src/cpuinfo/SDL_cpuinfo.c.obj
[95/281] Building C object CMakeFiles/SDL2.dir/src/SDL.c.obj
[96/281] Building C object CMakeFiles/SDL2.dir/src/events/SDL_clipboardevents.c.obj
[97/281] Building C object CMakeFiles/SDL2.dir/src/events/SDL_touch.c.obj
[98/281] Linking C static library SDL2maind.lib
[99/281] Building C object CMakeFiles/SDL2.dir/src/haptic/SDL_haptic.c.obj
[100/281] Building C object CMakeFiles/SDL2.dir/src/audio/SDL_audio.c.obj
[101/281] Building C object CMakeFiles/SDL2.dir/src/events/SDL_dropevents.c.obj
[102/281] Building C object CMakeFiles/SDL2.dir/src/events/SDL_displayevents.c.obj
[103/281] Building C object CMakeFiles/SDL2.dir/src/events/imKStoUCS.c.obj
[104/281] Building C object CMakeFiles/SDL2.dir/src/libm/e_atan2.c.obj
[105/281] Building C object CMakeFiles/SDL2.dir/src/libm/e_exp.c.obj
[106/281] Building C object CMakeFiles/SDL2.dir/src/joystick/controller_type.c.obj
[107/281] Building C object CMakeFiles/SDL2.dir/src/events/SDL_mouse.c.obj
[108/281] Building C object CMakeFiles/SDL2.dir/src/events/SDL_keyboard.c.obj
[109/281] Building C object CMakeFiles/SDL2.dir/src/libm/e_log.c.obj
[110/281] Building C object CMakeFiles/SDL2.dir/src/libm/e_fmod.c.obj
[111/281] Building C object CMakeFiles/SDL2.dir/src/events/SDL_gesture.c.obj
[112/281] Building C object CMakeFiles/SDL2.dir/src/events/SDL_events.c.obj
[113/281] Building C object CMakeFiles/SDL2.dir/src/events/SDL_quit.c.obj
[114/281] Building C object CMakeFiles/SDL2.dir/src/libm/k_cos.c.obj
[115/281] Building C object CMakeFiles/SDL2.dir/src/libm/e_log10.c.obj
[116/281] Building C object CMakeFiles/SDL2.dir/src/libm/e_pow.c.obj
[117/281] Building C object CMakeFiles/SDL2.dir/src/file/SDL_rwops.c.obj
[118/281] Building C object CMakeFiles/SDL2.dir/src/libm/e_sqrt.c.obj
[119/281] Building C object CMakeFiles/SDL2.dir/src/libm/e_rem_pio2.c.obj
[120/281] Building C object CMakeFiles/SDL2.dir/src/libm/s_copysign.c.obj
[121/281] Building C object CMakeFiles/SDL2.dir/src/events/SDL_windowevents.c.obj
[122/281] Building C object CMakeFiles/SDL2.dir/src/libm/k_tan.c.obj
[123/281] Building C object CMakeFiles/SDL2.dir/src/power/SDL_power.c.obj
[124/281] Building C object CMakeFiles/SDL2.dir/src/libm/k_rem_pio2.c.obj
[125/281] Building C object CMakeFiles/SDL2.dir/src/libm/s_atan.c.obj
[126/281] Building C object CMakeFiles/SDL2.dir/src/libm/k_sin.c.obj
[127/281] Building C object CMakeFiles/SDL2.dir/src/render/SDL_d3dmath.c.obj
[128/281] Building C object CMakeFiles/SDL2.dir/src/libm/s_cos.c.obj
[129/281] Building C object CMakeFiles/SDL2.dir/src/render/psp/SDL_render_psp.c.obj
[130/281] Building C object CMakeFiles/SDL2.dir/src/locale/SDL_locale.c.obj
[131/281] Building C object CMakeFiles/SDL2.dir/src/render/SDL_yuv_sw.c.obj
[132/281] Building C object CMakeFiles/SDL2.dir/src/libm/s_fabs.c.obj
[133/281] Building C object CMakeFiles/SDL2.dir/src/misc/SDL_url.c.obj
[134/281] Building C object CMakeFiles/SDL2.dir/src/libm/s_tan.c.obj
[135/281] Building C object CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.obj
[136/281] Building C object CMakeFiles/SDL2.dir/src/libm/s_sin.c.obj
[137/281] Building C object CMakeFiles/SDL2.dir/src/render/direct3d12/SDL_shaders_d3d12.c.obj
[138/281] Building C object CMakeFiles/SDL2.dir/src/libm/s_floor.c.obj
[139/281] Building C object CMakeFiles/SDL2.dir/src/libm/s_scalbn.c.obj
[140/281] Building C object CMakeFiles/SDL2.dir/src/joystick/SDL_gamecontroller.c.obj
[141/281] Building C object CMakeFiles/SDL2.dir/src/render/opengles/SDL_render_gles.c.obj
[142/281] Building C object CMakeFiles/SDL2.dir/src/render/direct3d12/SDL_render_d3d12.c.obj
[143/281] Building C object CMakeFiles/SDL2.dir/src/joystick/SDL_joystick.c.obj
[144/281] Building C object CMakeFiles/SDL2.dir/src/render/ps2/SDL_render_ps2.c.obj
[145/281] Building C object CMakeFiles/SDL2.dir/src/render/SDL_render.c.obj
[146/281] Building C object CMakeFiles/SDL2.dir/src/render/vitagxm/SDL_render_vita_gxm_tools.c.obj
[147/281] Building C object CMakeFiles/SDL2.dir/src/render/vitagxm/SDL_render_vita_gxm_memory.c.obj
[148/281] Building C object CMakeFiles/SDL2.dir/src/render/vitagxm/SDL_render_vita_gxm.c.obj
[149/281] Building C object CMakeFiles/SDL2.dir/src/render/opengles2/SDL_shaders_gles2.c.obj
[150/281] Building C object CMakeFiles/SDL2.dir/src/render/software/SDL_triangle.c.obj
[151/281] Building C object CMakeFiles/SDL2.dir/src/dynapi/SDL_dynapi.c.obj
[152/281] Building C object CMakeFiles/SDL2.dir/src/render/software/SDL_drawline.c.obj
[153/281] Building C object CMakeFiles/SDL2.dir/src/render/opengles2/SDL_render_gles2.c.obj
[154/281] Building C object CMakeFiles/SDL2.dir/src/render/software/SDL_blendpoint.c.obj
[155/281] Building C object CMakeFiles/SDL2.dir/src/stdlib/SDL_qsort.c.obj
[156/281] Building C object CMakeFiles/SDL2.dir/src/render/software/SDL_drawpoint.c.obj
[157/281] Building C object CMakeFiles/SDL2.dir/src/render/software/SDL_render_sw.c.obj
[158/281] Building C object CMakeFiles/SDL2.dir/src/stdlib/SDL_stdlib.c.obj
[159/281] Building C object CMakeFiles/SDL2.dir/src/stdlib/SDL_strtokr.c.obj
[160/281] Building C object CMakeFiles/SDL2.dir/src/stdlib/SDL_crc32.c.obj
[161/281] Building C object CMakeFiles/SDL2.dir/src/stdlib/SDL_string.c.obj
[162/281] Building C object CMakeFiles/SDL2.dir/src/render/software/SDL_blendfillrect.c.obj
[163/281] Building C object CMakeFiles/SDL2.dir/src/render/opengl/SDL_shaders_gl.c.obj
[164/281] Building C object CMakeFiles/SDL2.dir/src/render/software/SDL_rotate.c.obj
[165/281] Building C object CMakeFiles/SDL2.dir/src/stdlib/SDL_crc16.c.obj
[166/281] Building C object CMakeFiles/SDL2.dir/src/stdlib/SDL_iconv.c.obj
[167/281] Building C object CMakeFiles/SDL2.dir/src/render/direct3d/SDL_shaders_d3d.c.obj
[168/281] Building C object CMakeFiles/SDL2.dir/src/render/opengl/SDL_render_gl.c.obj
[169/281] Building C object CMakeFiles/SDL2.dir/src/stdlib/SDL_mslibc.c.obj
F:/Git/chalet/chalet-example-sdl2/chalet_external/sdl2/src/stdlib/SDL_mslibc.c:47:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma function(memcpy)
^
F:/Git/chalet/chalet-example-sdl2/chalet_external/sdl2/src/stdlib/SDL_mslibc.c:57:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma function(memset)
^
2 warnings generated.
[170/281] Building C object CMakeFiles/SDL2.dir/src/render/software/SDL_blendline.c.obj
[171/281] Building C object CMakeFiles/SDL2.dir/src/audio/dummy/SDL_dummyaudio.c.obj
[172/281] Building C object CMakeFiles/SDL2.dir/src/render/direct3d/SDL_render_d3d.c.obj
[173/281] Building C object CMakeFiles/SDL2.dir/src/thread/SDL_thread.c.obj
[174/281] Building C object CMakeFiles/SDL2.dir/src/render/direct3d11/SDL_shaders_d3d11.c.obj
[175/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_yuv.c.obj
[176/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_blit_0.c.obj
[177/281] Building C object CMakeFiles/SDL2.dir/src/render/direct3d11/SDL_render_d3d11.c.obj
[178/281] Building C object CMakeFiles/SDL2.dir/src/stdlib/SDL_getenv.c.obj
[179/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_blit_slow.c.obj
[180/281] Building C object CMakeFiles/SDL2.dir/src/sensor/SDL_sensor.c.obj
[181/281] Building C object CMakeFiles/SDL2.dir/src/stdlib/SDL_malloc.c.obj
F:/Git/chalet/chalet-example-sdl2/chalet_external/sdl2/src/stdlib/SDL_malloc.c:2994:16: warning: variable 'used' set but not used [-Wunused-but-set-variable]
size_t used = 0;
^
1 warning generated.
[182/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_blit_copy.c.obj
[183/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_vulkan_utils.c.obj
[184/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_fillrect.c.obj
[185/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_blit.c.obj
[186/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_bmp.c.obj
[187/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_RLEaccel.c.obj
[188/281] Building C object CMakeFiles/SDL2.dir/src/timer/SDL_timer.c.obj
[189/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_blit_A.c.obj
[190/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_rect.c.obj
[191/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_blit_1.c.obj
[192/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_blit_N.c.obj
[193/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_stretch.c.obj
[194/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_blit_auto.c.obj
[195/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_video.c.obj
[196/281] Building C object CMakeFiles/SDL2.dir/src/audio/disk/SDL_diskaudio.c.obj
[197/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_clipboard.c.obj
[198/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_egl.c.obj
[199/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_pixels.c.obj
[200/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_surface.c.obj
[201/281] Building C object CMakeFiles/SDL2.dir/src/joystick/virtual/SDL_virtualjoystick.c.obj
[202/281] Building C object CMakeFiles/SDL2.dir/src/video/SDL_shape.c.obj
[203/281] Building C object CMakeFiles/SDL2.dir/src/video/dummy/SDL_nullevents.c.obj
[204/281] Building C object CMakeFiles/SDL2.dir/src/video/dummy/SDL_nullframebuffer.c.obj
[205/281] Building C object CMakeFiles/SDL2.dir/src/video/dummy/SDL_nullvideo.c.obj
[206/281] Building C object CMakeFiles/SDL2.dir/src/core/windows/SDL_hid.c.obj
[207/281] Building C object CMakeFiles/SDL2.dir/src/video/windows/SDL_windowsmouse.c.obj
[208/281] Building C object CMakeFiles/SDL2.dir/src/core/windows/SDL_xinput.c.obj
[209/281] Building C object CMakeFiles/SDL2.dir/src/video/windows/SDL_windowsmessagebox.c.obj
[210/281] Building C object CMakeFiles/SDL2.dir/src/video/windows/SDL_windowsmodes.c.obj
[211/281] Building C object CMakeFiles/SDL2.dir/src/video/windows/SDL_windowskeyboard.c.obj
[212/281] Building C object CMakeFiles/SDL2.dir/src/misc/windows/SDL_sysurl.c.obj
[213/281] Building C object CMakeFiles/SDL2.dir/src/video/windows/SDL_windowsopengl.c.obj
[214/281] Building C object CMakeFiles/SDL2.dir/src/joystick/hidapi/SDL_hidapi_ps4.c.obj
[215/281] Building C object CMakeFiles/SDL2.dir/src/joystick/hidapi/SDL_hidapi_gamecube.c.obj
[216/281] Building C object CMakeFiles/SDL2.dir/src/core/windows/SDL_windows.c.obj
[217/281] Building C object CMakeFiles/SDL2.dir/src/joystick/hidapi/SDL_hidapi_luna.c.obj
[218/281] Building C object CMakeFiles/SDL2.dir/src/core/windows/SDL_immdevice.c.obj
[219/281] Building C object CMakeFiles/SDL2.dir/src/joystick/hidapi/SDL_hidapi_ps5.c.obj
[220/281] Building C object CMakeFiles/SDL2.dir/src/audio/winmm/SDL_winmm.c.obj
[221/281] Building C object CMakeFiles/SDL2.dir/src/audio/wasapi/SDL_wasapi_win32.c.obj
[222/281] Building C object CMakeFiles/SDL2.dir/src/audio/wasapi/SDL_wasapi.c.obj
[223/281] Building C object CMakeFiles/SDL2.dir/src/joystick/hidapi/SDL_hidapi_rumble.c.obj
[224/281] Building C object CMakeFiles/SDL2.dir/src/audio/directsound/SDL_directsound.c.obj
[225/281] Building C object CMakeFiles/SDL2.dir/src/thread/generic/SDL_syscond.c.obj
[226/281] Building C object CMakeFiles/SDL2.dir/src/video/windows/SDL_windowsclipboard.c.obj
[227/281] Building C object CMakeFiles/SDL2.dir/src/video/windows/SDL_windowsframebuffer.c.obj
[228/281] Building C object CMakeFiles/SDL2.dir/src/thread/windows/SDL_systhread.c.obj
[229/281] Building C object CMakeFiles/SDL2.dir/src/video/windows/SDL_windowsevents.c.obj
[230/281] Building C object CMakeFiles/SDL2.dir/src/thread/windows/SDL_syscond_cv.c.obj
[231/281] Building C object CMakeFiles/SDL2.dir/src/thread/windows/SDL_sysmutex.c.obj
[232/281] Building C object CMakeFiles/SDL2.dir/src/video/windows/SDL_windowswindow.c.obj
[233/281] Building C object CMakeFiles/SDL2.dir/src/thread/windows/SDL_syssem.c.obj
[234/281] Building C object CMakeFiles/SDL2.dir/src/joystick/hidapi/SDL_hidapi_combined.c.obj
[235/281] Building C object CMakeFiles/SDL2.dir/src/video/windows/SDL_windowsshape.c.obj
[236/281] Building C object CMakeFiles/SDL2.dir/src/video/windows/SDL_windowsopengles.c.obj
[237/281] Building C object CMakeFiles/SDL2.dir/src/locale/windows/SDL_syslocale.c.obj
[238/281] Building C object CMakeFiles/SDL2.dir/src/video/windows/SDL_windowsvulkan.c.obj
[239/281] Building C object CMakeFiles/SDL2.dir/src/video/windows/SDL_windowsvideo.c.obj
[240/281] Building C object CMakeFiles/SDL2_test.dir/src/test/SDL_test_assert.c.obj
[241/281] Building C object CMakeFiles/SDL2_test.dir/src/test/SDL_test_crc32.c.obj
[242/281] Building C object CMakeFiles/SDL2.dir/src/thread/windows/SDL_systls.c.obj
[243/281] Building C object CMakeFiles/SDL2_test.dir/src/test/SDL_test_compare.c.obj
[244/281] Building C object CMakeFiles/SDL2.dir/src/joystick/hidapi/SDL_hidapi_xbox360.c.obj
[245/281] Building C object CMakeFiles/SDL2.dir/src/power/windows/SDL_syspower.c.obj
[246/281] Building C object CMakeFiles/SDL2_test.dir/src/test/SDL_test_font.c.obj
[247/281] Building C object CMakeFiles/SDL2.dir/src/joystick/hidapi/SDL_hidapi_steam.c.obj
[248/281] Building C object CMakeFiles/SDL2.dir/src/loadso/windows/SDL_sysloadso.c.obj
[249/281] Building C object CMakeFiles/SDL2.dir/src/timer/windows/SDL_systimer.c.obj
[250/281] Building C object CMakeFiles/SDL2.dir/src/joystick/hidapi/SDL_hidapi_shield.c.obj
[251/281] Building C object CMakeFiles/SDL2.dir/src/joystick/hidapi/SDL_hidapi_stadia.c.obj
[252/281] Building C object CMakeFiles/SDL2_test.dir/src/test/SDL_test_common.c.obj
[253/281] Building C object CMakeFiles/SDL2.dir/src/sensor/windows/SDL_windowssensor.c.obj
[254/281] Building C object CMakeFiles/SDL2.dir/src/filesystem/windows/SDL_sysfilesystem.c.obj
[255/281] Building C object CMakeFiles/SDL2.dir/src/joystick/hidapi/SDL_hidapi_xbox360w.c.obj
[256/281] Building C object CMakeFiles/SDL2.dir/src/joystick/hidapi/SDL_hidapi_switch.c.obj
[257/281] Building C object CMakeFiles/SDL2.dir/src/joystick/hidapi/SDL_hidapi_xboxone.c.obj
[258/281] Building C object CMakeFiles/SDL2_test.dir/src/test/SDL_test_imageBlit.c.obj
[259/281] Building RC object CMakeFiles/SDL2.dir/src/main/windows/version.rc.res
[260/281] Building C object CMakeFiles/SDL2_test.dir/src/test/SDL_test_imageFace.c.obj
[261/281] Building C object CMakeFiles/SDL2_test.dir/src/test/SDL_test_imageBlitBlend.c.obj
[262/281] Building C object CMakeFiles/SDL2_test.dir/src/test/SDL_test_harness.c.obj
[263/281] Building C object CMakeFiles/SDL2_test.dir/src/test/SDL_test_fuzzer.c.obj
[264/281] Building C object CMakeFiles/SDL2_test.dir/src/test/SDL_test_memory.c.obj
[265/281] Building C object CMakeFiles/SDL2.dir/src/joystick/hidapi/SDL_hidapijoystick.c.obj
[266/281] Building C object CMakeFiles/SDL2_test.dir/src/test/SDL_test_imagePrimitivesBlend.c.obj
[267/281] Building C object CMakeFiles/SDL2_test.dir/src/test/SDL_test_log.c.obj
[268/281] Building C object CMakeFiles/SDL2_test.dir/src/test/SDL_test_imagePrimitives.c.obj
[269/281] Building C object CMakeFiles/SDL2_test.dir/src/test/SDL_test_md5.c.obj
[270/281] Building C object CMakeFiles/SDL2_test.dir/src/test/SDL_test_random.c.obj
[271/281] Building C object CMakeFiles/SDL2.dir/src/joystick/windows/SDL_dinputjoystick.c.obj
[272/281] Building C object CMakeFiles/SDL2.dir/src/joystick/windows/SDL_xinputjoystick.c.obj
[273/281] Building C object CMakeFiles/SDL2.dir/src/haptic/windows/SDL_windowshaptic.c.obj
[274/281] Building C object CMakeFiles/SDL2.dir/src/joystick/windows/SDL_windowsjoystick.c.obj
[275/281] Building C object CMakeFiles/SDL2.dir/src/haptic/windows/SDL_dinputhaptic.c.obj
[276/281] Building C object CMakeFiles/SDL2.dir/src/haptic/windows/SDL_xinputhaptic.c.obj
[277/281] Building C object CMakeFiles/SDL2.dir/src/video/yuv2rgb/yuv_rgb.c.obj
[278/281] Linking C static library SDL2_test.lib
[279/281] Building C object CMakeFiles/SDL2.dir/src/joystick/windows/SDL_rawinputjoystick.c.obj
[280/281] Building C object CMakeFiles/SDL2.dir/src/joystick/windows/SDL_windows_gaming_input.c.obj
[281/281] Linking C shared library SDL2d.dll
sdl2: Target is up to date.
Time: 21.105s
» Build: sdl2-app.exe
[1/4] build/int.sdl2-app/manifest.rc
[2/4] src/PCH.hpp
[3/4] src/Main.cpp
[4/4] Linking build/x86_64-pc-windows-msvc_Debug/sdl2-app.exe
FAILED: build/x86_64-pc-windows-msvc_Debug/sdl2-app.exe
"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/x64/bin/clang++.exe" -target x86_64-pc-windows-msvc -Wl,/subsystem:console -Wl,/entry:mainCRTStartup -L"build/x86_64-pc-windows-msvc_Debug/chalet_external/sdl2" -L"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/llvm/x64/lib" -L"build/x86_64-pc-windows-msvc_Debug" -o "build/x86_64-pc-windows-msvc_Debug/sdl2-app.exe" build/x86_64-pc-windows-msvc_Debug/obj.sdl2-app/src/Main.cpp.obj build/x86_64-pc-windows-msvc_Debug/obj.sdl2-app/build/int.sdl2-app/manifest.rc.res -lSDL2d -ldbghelp -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
libcpmtd.lib(xlocale.obj) : error LNK2001: unresolved external symbol _CrtDbgReport
Main.cpp.obj : error LNK2001: unresolved external symbol _CrtDbgReport
libcpmtd.lib(cout.obj) : error LNK2001: unresolved external symbol _CrtDbgReport
libcpmtd.lib(locale.obj) : error LNK2001: unresolved external symbol _CrtDbgReport
libcpmtd.lib(wlocale.obj) : error LNK2001: unresolved external symbol _CrtDbgReport
libcpmtd.lib(wlocale.obj) : error LNK2001: unresolved external symbol _free_dbg
libcpmtd.lib(xlocale.obj) : error LNK2001: unresolved external symbol _free_dbg
libcpmtd.lib(xwcsxfrm.obj) : error LNK2001: unresolved external symbol _free_dbg
libcpmtd.lib(StlCompareStringA.obj) : error LNK2001: unresolved external symbol _free_dbg
libcpmtd.lib(cout.obj) : error LNK2001: unresolved external symbol _free_dbg
libcpmtd.lib(locale0.obj) : error LNK2001: unresolved external symbol _free_dbg
libcpmtd.lib(locale.obj) : error LNK2001: unresolved external symbol _free_dbg
libcpmtd.lib(StlLCMapStringA.obj) : error LNK2001: unresolved external symbol _free_dbg
libcpmtd.lib(wlocale.obj) : error LNK2001: unresolved external symbol _malloc_dbg
libcpmtd.lib(xlocale.obj) : error LNK2001: unresolved external symbol _malloc_dbg
libcpmtd.lib(xwcsxfrm.obj) : error LNK2001: unresolved external symbol _malloc_dbg
libcpmtd.lib(StlCompareStringA.obj) : error LNK2001: unresolved external symbol _malloc_dbg
libcpmtd.lib(cout.obj) : error LNK2001: unresolved external symbol _malloc_dbg
libcpmtd.lib(locale0.obj) : error LNK2001: unresolved external symbol _malloc_dbg
libcpmtd.lib(locale.obj) : error LNK2001: unresolved external symbol _malloc_dbg
libcpmtd.lib(StlLCMapStringA.obj) : error LNK2001: unresolved external symbol _malloc_dbg
libcpmtd.lib(_tolower.obj) : error LNK2019: unresolved external symbol _calloc_dbg referenced in function _Getctype
libcpmtd.lib(locale.obj) : error LNK2001: unresolved external symbol _calloc_dbg
libcpmtd.lib(wlocale.obj) : error LNK2001: unresolved external symbol _calloc_dbg
libcpmtd.lib(xlocale.obj) : error LNK2001: unresolved external symbol _calloc_dbg
libcpmtd.lib(_tolower.obj) : error LNK2019: unresolved external symbol _wcsdup_dbg referenced in function _Getctype
libcpmtd.lib(xstrcoll.obj) : error LNK2001: unresolved external symbol _wcsdup_dbg
libcpmtd.lib(locale.obj) : error LNK2019: unresolved external symbol _realloc_dbg referenced in function "private: static void __cdecl std::locale::_Locimp::_Locimp_Addfac(class std::locale::_Locimp *,class std::locale::facet *,unsigned __int64)" (?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z)
libcpmtd.lib(StlLCMapStringA.obj) : error LNK2019: unresolved external symbol _CrtDbgReportW referenced in function _freea_crt
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
libcpmtd.lib(StlCompareStringA.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
build\x86_64-pc-windows-msvc_Debug\sdl2-app.exe : fatal error LNK1120: 7 unresolved externals
clang++: error: linker command failed with exit code 1120 (use -v to see invocation)
ninja: build stopped: subcommand failed.
X Failed!
Review the errors above.
Aaah gotcha. I should have tested this more closely. I'll get that fixed - It has to do with clang using lld-link.exe under the hood, which probably requires the specific windows runtime library to be defined. /MT /MTd /MD /MDd - probably what you were thinking of before.
This is the workaround for now (place in sdl2-app > settings:Cxx):
"linkerOptions[:debug+toolchain:llvm-vs-2022]": [
"-Wl,/nodefaultlib:libcmt"
],
"links[:debug+toolchain:llvm-vs-2022]": [
"msvcrtd"
"vcruntimed",
"ucrtd"
]
I guess I just have to manually specify these instead of using /MD /MDd etc...
Release DLLs (/MD ): msvcrt.lib vcruntime.lib ucrt.lib
Debug DLLs (/MDd): msvcrtd.lib vcruntimed.lib ucrtd.lib
Release Static (/MT ): libcmt.lib libvcruntime.lib libucrt.lib
Debug Static (/MTd): libcmtd.lib libvcruntimed.lib libucrtd.lib
I'll have an update out...
Try this version: v0.5.10
Fixed the runtime library issues, and made sure the linker uses the same options that are passed to LINK.exe in the normal MSVC builds. Was able to make the Debug builds and debug them (in VSCode w/ C++ extension debugger and CodeLLDB)
As for things that definitely don't work
- No clang-cl support yet (probably not for a while - it'll be a pain in the ass). right now the cli args that are passed are kind of a weird hybrid of GNU-style and MSVC-style
- Profile configuration - Got really close, but the linker fails with an undefined reference to "mcount". Some google searching leads me to believe it's not possible to link against on Windows, but I could be wrong. Profiling on this toolchain is still disabled in this version
- Sanitizers - If you need the address sanitizer, I think you'll only be able to get it working in a custom build configuration without debug symbols, because it requires /MT, but I haven't tried it. I only know
DebugSanitizeAddressfails due to the mismatch in the clang library it requires.
Just tested the new version, and it works great! For me personally having clang-cl working is not particularly important. I haven't tried using profiling with Chalet yet, but it does sound interesting. I also haven't gotten the address sanitizers to work in my current Windows/Clang/CMake setup, so I'm not really using it (but it would be a great feature to have some point!)
Awesome! I'll close this out. Feel free to open a new issue if something unexpected comes up.