简体   繁体   中英

Cannot compile wxWidgets with CMake

I'm trying to compile wxWidgets with CMake. I cannot get it to work. There's so many error messages that I'll just link a pastebin with the logs here: https://pastebin.com/wLk4aSvy

The first error reported is

CMake Error: failed to create symbolic link 'C:/dev/libraries/wxWidgets-3.1.5/compiling/wx-config': operation not permitted

Luckily in the pastebin you can also see the commands and directories I used. As for details:

CMake Version: 3.20.1
wxWidgets Version: 3.1.5 (development release)
build system: Ninja
compiler: Clang++ (from LLVM package)
OS: Windows 8

Note that I used the development release instead of the stable release because the stable didn't contain any CMakeLists.txt AFAIK. Please help me get this working, thanks.

Why do you want to build wxWidgets itself with CMake thingy?

The library provides everything you need to build the library itself- all makefiles and solutions are there.

You can also use pre-built binaries - just need to make sure you get one for your compiler.

Let us know if you have issues compiling.

Since you are on Windows and using MSVC do the following:

Start MSVC.

Click "File -> Open...", then open the wx_vcN.sln from wxWidgets\build\msw folder (I don't know what MSVC version you are using but you can check the official documentation which N correspond to which MSVC version)

Go to "Build -> Batch Build...", click "Select ALL", then click "Build". Go drink some coffee.

In the MSVC, open wxWidgets\samples\minimal\minimal.dsw or minimal.sln. Select "Build -> Build Project", then execute the produced binary.

If you can see the window whose title says "Minimal wxWidgets" or something to that extent - you are done.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM