I remember having to do the same thing and ended up copying most of the androidapplication class and modifying it. @mosra if you might be able to take this into androidapplication, would be great
This is fine, but you should destroy the old resources, like the GL Surface, when re-creating the new one, otherwise you will result in a memory leak!
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,66): warning C4346: 'Magnum::Math::IsScalar<T>::value': dependent name is not a type [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,66): message : prefix with 'typename' to indicate a type [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,82): error C2146: syntax error: missing ')' before identifier 'value' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,82): error C2365: 'T': redefinition; previous definition was 'template parameter' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53): message : see declaration of 'T' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,82): error C2061: syntax error: identifier 'value' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,19): error C2059: syntax error: ')' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,82): error C2146: syntax error: missing ')' before identifier 'min' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,82): error C2146: syntax error: missing ';' before identifier 'min' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,102): error C2143: syntax error: missing ';' before '{' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(53,102): error C2447: '{': missing function header (old-style formal list?) [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56,66): warning C4346: 'Magnum::Math::IsScalar<T>::value': dependent name is not a type [C:\Users\paul\coding\neurite\frontiers\scratch\sdlcs_helloworld_multiplatform\plugins\mag-plugin-node-api\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56,66): message : prefix with 'typename' to indicate a type [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56,82): error C2146: syntax error: missing ')' before identifier 'value' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56,82): error C2365: 'T': redefinition; previous definition was 'template parameter' [C:\Users\paul\coding\neurite\frontiers\scratch\sdlcs_helloworld_multiplatform\plugins\mag-plugin-node-api\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56): message : see declaration of 'T' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56,82): error C2061: syntax error: identifier 'value' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56,19): error C2059: syntax error: ')' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56,82): error C2146: syntax error: missing ')' before identifier 'max' [C:\coding\build\plugin-node-api.vcxproj]
C:\coding\build\_deps\magnum-src\src\Magnum/Math/Vector.h(56,82): error C2146: syntax error: missing ';' before identifier 'max' [C:\coding\build\plugin-node-api.vcxproj]
#define NOMINMAX
? :)
NOMINMAX
first
NOMINMAX
globally for the entire project through CMake target property (target_compile_definitions
or something). In theory, Magnum could do that the same way and make in PUBLIC
. The latter has the downside of being totalitarian.
Is this a pretty common error case when getting started with Magnum and Windows?
@OptimusLime you'd hit this whenever there's a variable or a function defined min
or max
anywhere, so i wouldn't say this is specific to Magnum, even the standard <limits>
header has issues with this ... so i'd say dealing with NOMINMAX
is a common Windows practice? (not a Windows user myself tho)
Dunno if it's a Corrade or C++ issue (leaning towards the latter), but I got something weird today.
I have a growable Array
containing Pointer<Base>
s to take advantage of polymorphism.
I tried doing arrayAppend(array, pointer<Derived>(args))
, but the compiler rejected it.
However, Pointer<Base> p = pointer<Derived>(args)
followed by arrayAppend(array, p)
is fine.
arrayAppend(Array<T>&, const std::common_type<T>::type&)
instead of arrayAppend(Array<T>&, const T&)
and then it would work i think
i guess i could do also arrayInsert() and arrayRemove() while at it
Now that I think about it, while I won't need arrayInsert()
, arrayRemove()
will be useful.
While I could do std::remove_if()
combined with arrayRemoveSuffix()
, it's a bit too long just to remove single elements.
CMake Error at scripts/cmake/vcpkg_from_github.cmake:164 (message):
Failed to parse API response from '':
{
"ref": "refs/heads/master",
"node_id": "MDM6UmVmMjg2MzkwOTpyZWZzL2hlYWRzL21hc3Rlcg==",
"url": "https://api.github.com/repos/mosra/corrade/git/refs/heads/master",
"object": {
"sha": "34a53fab11928765f5fb2704b5653769a20b63a5",
"type": "commit",
"url": "https://api.github.com/repos/mosra/corrade/git/commits/34a53fab11928765f5fb2704b5653769a20b63a5"
}
}
Call Stack (most recent call first):
ports/corrade/portfile.cmake:1 (vcpkg_from_github)
scripts/ports.cmake:140 (include)