我在尝试一个新的设置。我使用的是64位Windows 10,我在Visual 2017上有介子示例项目和clang编译器堆栈。这两个都挡在我的路上。
[0/1] Regenerating build files.
The Meson build system Version: 0.49.0
Source dir: C:\WORK\cpp-example\wx-example
Build dir: C:\WORK\cpp-example\wx-example\builddir
Build type: native build
Project name: wx-example
Project version: undefined
Native C++ compiler: clang++ (clang 7.0.0 "clang version 7.0.0 (tags/RELEASE_700/final)")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found wx-config '>=3.0.0' NO
Dependency WxWidgets found: NO (tried config-tool)
meson.build:8:2: ERROR: Dependency "wxwidgets" not found, tried config-tool
A full log can be found at C:\WORK\cpp-example\wx-example\builddir\meson-logs\meson-log.txt
FAILED: build.ninja我的meson.build是
project('wx-example', 'cpp')
#if build_machine.system() == 'windows'
# cpp = meson.get_compiler('cpp')
# add_project_link_arguments(['C:\WORK\wxWidgets-3.1.2\include'], language : 'cpp')
# wx_dep = cpp.find_library('wxwidgets', dirs : ['C:\WORK\wxWidgets-3.1.2\lib\vc_x64_dll'])
#else
wx_dep = dependency('wxwidgets', version : '>=3.0.0', required : true)
#endif
executable('wx-example.exe', ['main.cpp'], dependencies : [wx_dep])你知道如何编译我的例子吗?也许我应该使用MinGW wxWitgets软件包?
发布于 2019-01-15 11:23:52
Meson对wxWidgets的依赖只支持最初打算使用的wx-config工具,因此您需要首先获得wx-config Windows本机端口,以使其与VC++一起工作。
顺便说一下。也许甚至最简单的方法就是自己编写它,因为它只是一个常规的控制台应用程序,它解析命令行并吐出相应的编译器/链接器标志。
也许我应该使用MinGW wxWitgets软件包?
当然,这是可能的,但随后您也将不得不切换到gcc/g++。此外,Meson的wxWidgets dependency 仍然破碎 it MSYS2/MinGW。问题是Meson错误地试图直接执行wx-config,而在Windows下它必须以env/sh/bash或其他任何东西作为前缀。修复它不是什么大问题,但您仍有一些工作要做。
UPD.:问题似乎在Meson 0.51.0中得到了解决。
https://stackoverflow.com/questions/53768324
复制相似问题