Comments (7)
Seems to be installing now with vcpkg using my powershell 7 install and not the default shell in CLion. I hadn't spotted that part of the error message π€¦. So windows comes with PowerShell 5, before it was made into the new multiplatform powershell 7 and powershell core so I guess because CLion defaults to PWSH 5 it couldn't find the correct pwsh core
from corrade.
Hello! :)
Oh, haha, version 2019.10, seems like Hunter packages didn't get updated in quite a while. This is an error that happens on MSVC 2022, and is fixed since 00cfbbb (Feb 2022). Unfortunately no release was tagged since (it's tracked in mosra/magnum#453), so even if Hunter was on latest stable release, it wouldn't help.
You have these options:
- Use latest
master
via some other package manager such as vcpkg, by building manually, or by using a CMake subproject. I recommend this option because there's just a lot that happened since. - Or, if you can't, pass
/permissive-
toCMAKE_CXX_FLAGS
. I hope Hunter can pick it up, somehow. That makes this particular error go away, and hopefully could be also enough to make Magnum build. But I can't say for sure, there might be other things that make the old 2019.10 release broken with MSVC 2022.
from corrade.
So, I was trying to use vcpkg and it was failing at compiling corrade too. C++ tooling is something I struggle with so I could be doing it wrong
PS C:\Users\cocac\CLionProjects\untitled> ./vcpkg/vcpkg install magnum:x64-windows
Computing installation plan...
The following packages will be built and installed:
* corrade[core,interconnect,pluginmanager,testsuite,utility]:x64-windows -> 2020.06#4
magnum[anyaudioimporter,anyimageconverter,anyimageimporter,anysceneconverter,anysceneimporter,anyshaderconverter,audio,core,debugtools,gl,meshtools,primitives,sc
enegraph,sdl2application,shaders,shadertools,text,texturetools,trade]:x64-windows -> 2020.06#9
* openal-soft[core]:x64-windows -> 1.21.1#5
* sdl2[core]:x64-windows -> 2.0.22
* vcpkg-cmake[core]:x64-windows -> 2022-05-10
* vcpkg-cmake-config[core]:x64-windows -> 2022-02-06
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Restored 0 packages from C:\Users\cocac\AppData\Local\vcpkg\archives in 712.6 us. Use --debug to see more details.
Installing 1/6 corrade:x64-windows...
Building corrade[core,interconnect,pluginmanager,testsuite,utility]:x64-windows...
-- Using cached mosra-corrade-v2020.06.tar.gz.
-- Cleaning sources at C:/Users/cocac/CLionProjects/untitled/vcpkg/buildtrees/corrade/src/v2020.06-a168426893.clean. Use --editable to skip cleaning for the packages
you specify.
-- Extracting source C:/Users/cocac/CLionProjects/untitled/vcpkg/downloads/mosra-corrade-v2020.06.tar.gz
-- Applying patch fix-vs2019.patch
-- Applying patch build-corrade-rc-always.patch
-- Using source at C:/Users/cocac/CLionProjects/untitled/vcpkg/buildtrees/corrade/src/v2020.06-a168426893.clean
-- Found external ninja('1.10.2').
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
CMake Error at scripts/cmake/vcpkg_copy_tool_dependencies.cmake:52 (message):
Could not find PowerShell Core; please open an issue to report this.
Call Stack (most recent call first):
scripts/cmake/vcpkg_copy_tools.cmake:82 (vcpkg_copy_tool_dependencies)
ports/corrade/portfile.cmake:56 (vcpkg_copy_tools)
scripts/ports.cmake:146 (include)
error: building corrade:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+corrade
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[corrade]+Build+error
Include '[corrade] Build error' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above.
vcpkg-tool version: 2022-05-05-67e17c1782801cf481be9ac0b3765dff3e4bdeb8
vcpkg-scripts version: d953973cf 2022-05-27 (22 hours ago)
from corrade.
CMake Error at scripts/cmake/vcpkg_copy_tool_dependencies.cmake:52 (message):
Could not find PowerShell Core; please open an issue to report this.
Seems like Vcpkg itself is broken π I don't know what to suggest here, except for directing this to Vcpkg developers. Or maybe there's some shortcut, like installing PowerShell Core? But why wouldn't it be on Windows by default? I'm not on Windows, so I can only guess.
C++ tooling is
... sometimes extremely cursed, and especially on Windows. Sorry about the bad experience.
from corrade.
Sorry to be a hassle, in the magnum docs it says "Packages installed using Vcpkg can be used in Visual Studio straight away β all you need to do is to #include the headers you want and the buildsystem will do all needed library linking and setup behind the scenes automatically. (Cool, isn't it?)".
As a non visual studio user, what should the correct target_include_directories be?
from corrade.
Ahhh YEY! Got it.
For others, my working cmake config is:
cmake_minimum_required(VERSION 3.22)
project(untitled)
find_package(Magnum REQUIRED GL Sdl2Application)
set(CMAKE_CXX_STANDARD 20)
add_executable(main main.cpp)
target_include_directories(main PRIVATE ${Magnum_INCLUDE_DIRS})
target_link_libraries(main PRIVATE
Magnum::Application
Magnum::GL
Magnum::Magnum)
with the sample code of
#include <Magnum/GL/DefaultFramebuffer.h>
#include <Magnum/Platform/Sdl2Application.h>
using namespace Magnum;
class MyApplication: public Platform::Application {
public:
explicit MyApplication(const Arguments& arguments);
private:
void drawEvent() override;
};
MyApplication::MyApplication(const Arguments& arguments):
Platform::Application{arguments}
{
// TODO: Add your initialization code here
}
void MyApplication::drawEvent() {
GL::defaultFramebuffer.clear(GL::FramebufferClear::Color);
// TODO: Add your drawing code here
swapBuffers();
}
MAGNUM_APPLICATION_MAIN(MyApplication)
thanks @mosra for the help!
from corrade.
Yay! π Just to answer what you were asking above -- the
target_include_directories(main PRIVATE ${Magnum_INCLUDE_DIRS})
bit shouldn't be needed, at all. Just target_link_libraries()
. The Magnum::Foo
CMake imported targets take care of all that -- supplying include directories, compiler/linker flags (if needed), and linking the right libraries in the right order.
from corrade.
Related Issues (20)
- Corrade's test suite fails under AddressSanitizer HOT 9
- Corrade with BUILD_TESTS=ON compilation error: call to non-βconstexprβ function HOT 5
- Prefix cmake options with CORRADE_ HOT 4
- Windows: inconsistent redefinition of _aligned_malloc HOT 3
- Corrade adds /wd*** warning disablements to "clang.exe" on windows. HOT 1
- Building Corrade with -std=c++20 causes errors inside MinGW <numbers> header HOT 3
- Corrade fails to compile with emscripten 3.1.22 HOT 4
- Opt-in to native UTF-8 support for OS interaction on Windows
- std::tuple_size / tuple_element specializations for Corrade containers HOT 1
- error: cannot initialize a variable of type 'const char *const' with an rvalue of type 'int' HOT 3
- Optimizing compilation time for the test suite -- an analysis HOT 3
- Interconnect - Slots are not called according to their record order HOT 1
- V8::Zone Allocator HOT 1
- NEON code does not build on armv7 HOT 2
- what to set CORRADE_INCLUDE_DIR to for in-source-builds HOT 2
- JsonToken::asObject() odd behavior with empty objects HOT 2
- New Release HOT 1
- Broken Interconnect on Clang-CL 16.0.5 HOT 9
- Packaging location of GDB script files HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from corrade.