Skip to content
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

project('tutorial', 'cpp') works, but add_languages('cpp') fails with MSVC #13085

Open
13lackade opened this issue Apr 13, 2024 · 0 comments
Open
Labels
bug compilers OS:windows Winodows OS specific issues

Comments

@13lackade
Copy link

Describe the bug
When I use MSVC as C++ compiler, project('tutorial', 'cpp') works, but add_languages('cpp') fails with this output.

$ meson setup build
The Meson build system
Version: 1.4.99
Source dir: C:\Test
Build dir: C:\Test\build
Build type: native build
Project name: tutorial
Project version: undefined
Host machine cpu family: x86_64
Host machine cpu: x86_64

meson.build:3:0: ERROR: Compiler cl cannot compile programs.

A full log can be found at C:\Test\build\meson-logs\meson-log.txt

meson-log.txt
meson-info.json

To Reproduce

  1. This is the content of meson.build
project('tutorial')
add_languages('cpp')
executable('demo', 'main.cpp')
  1. On x64 Native Tools Command Prompt for VS 2022, run meson setup build.

Expected behavior
Works as well as when I use project('tutorial', 'cpp').

system parameters

  • MSVC version : Microsoft (R) C/C++ Optimizing Compiler Version 19.39.33523 for x64
  • Native build
  • Operating system : Windows11 23H2
  • python --version : Python 3.13.0a2
  • meson --version : 1.4.99
  • ninja --version : 1.11.0
@dcbaker dcbaker added bug compilers OS:windows Winodows OS specific issues labels Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug compilers OS:windows Winodows OS specific issues
Projects
None yet
Development

No branches or pull requests

2 participants