GithubHelp home page GithubHelp logo

Comments (9)

SirMangler avatar SirMangler commented on August 28, 2024

std::lerp, I was worried that might not compile on Linux. Luckily cmath seems to contain lerp for Linux. This commit should fix the other problems too,
81b9fcf

from ishiiruka.

Linskun avatar Linskun commented on August 28, 2024

Tried but i have the same

/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/FpsControls.cpp:631:18: error: ‘lerp’ is not a member of ‘std’
  631 |     pitch = std::lerp(start_pitch, 0.f, delta / 15.f);
      |                  ^~~~
make[2]: *** [Source/Core/Core/CMakeFiles/core.dir/build.make:3059: Source/Core/Core/CMakeFiles/core.dir/PrimeHack/Mods/FpsControls.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1148: Source/Core/Core/CMakeFiles/core.dir/all] Error 2
make: *** [Makefile:171: all] Error 2

from ishiiruka.

SirMangler avatar SirMangler commented on August 28, 2024

You may need to compile with a later version of C++. std::lerp was only added in C++20. I'll look into this more later, there may be a built in function for it in Dolphin like there is for Qt.

from ishiiruka.

Linskun avatar Linskun commented on August 28, 2024

Tried with clang++ but it stop immediately with error

[user@Arch Build]$ make
Scanning dependencies of target bdisasm
[  0%] Building CXX object Externals/Bochs_disasm/CMakeFiles/bdisasm.dir/dis_decode.cc.o
[  0%] Building CXX object Externals/Bochs_disasm/CMakeFiles/bdisasm.dir/dis_groups.cc.o
[  1%] Building CXX object Externals/Bochs_disasm/CMakeFiles/bdisasm.dir/resolve.cc.o
[  1%] Building CXX object Externals/Bochs_disasm/CMakeFiles/bdisasm.dir/syntax.cc.o
[  1%] Linking CXX static library libbdisasm.a
[  1%] Built target bdisasm
Scanning dependencies of target glslang
[  1%] Building CXX object Externals/glslang/CMakeFiles/glslang.dir/glslang/GenericCodeGen/CodeGen.cpp.o
In file included from /home/user/Games/primehack-ishiiruka/Externals/glslang/glslang/GenericCodeGen/CodeGen.cpp:35:
In file included from /home/user/Games/primehack-ishiiruka/Externals/glslang/glslang/GenericCodeGen/../Include/Common.h:95:
/home/user/Games/primehack-ishiiruka/Externals/glslang/glslang/GenericCodeGen/../Include/PoolAlloc.h:315:54: error: 'operator=' is a private member of 'glslang::TPoolAllocator'
    void setAllocator(TPoolAllocator* a) { allocator = *a; }
                                           ~~~~~~~~~ ^ ~~
/home/user/Games/primehack-ishiiruka/Externals/glslang/glslang/GenericCodeGen/../Include/PoolAlloc.h:244:21: note: declared private here
    TPoolAllocator& operator=(const TPoolAllocator&);  // don't allow assignment operator
                    ^
1 error generated.
make[2]: *** [Externals/glslang/CMakeFiles/glslang.dir/build.make:82: Externals/glslang/CMakeFiles/glslang.dir/glslang/GenericCodeGen/CodeGen.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:742: Externals/glslang/CMakeFiles/glslang.dir/all] Error 2
make: *** [Makefile:171: all] Error 2

I found this issue on Dolphin-emu bugtracker : Emulator Issues #12032

from ishiiruka.

SirMangler avatar SirMangler commented on August 28, 2024

Trouble is, this is the PrimeHack-Ishiiruka repository, Ishiiruka is a fork of dolphin which is pretty old by a few years. You'd have to talk to the maintainers for Ishiiruka about stuff not relevant to PrimeHack.

Have you ensured you're compiling with C++20?

from ishiiruka.

SirMangler avatar SirMangler commented on August 28, 2024

This should resolve the problem:
2a67e9e

from ishiiruka.

Linskun avatar Linskun commented on August 28, 2024

Happy new Year !

I'm using the latest version of GCC & CLANG
I've checked on CMakeLists.txt and found that it check for CXX17 and pass -std=c++17.
For C++20 shouldn't it check the CXX20 support and pass -std=c++20 parameter ?

Ok now i don't have anymore problem on FPSControl.cpp.o but it give me another error :

/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘MENU’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘MENU_PRIME_1’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘MENU_PRIME_2’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_1’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_2’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_3’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_3_STANDALONE’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_2_GCN’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘MAX_VAL’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp: In member function ‘std::optional<std::__cxx11::basic_string<char> > prime::ElfModLoader::parse_elfpath(const string&, const string&)’:
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:191:42: error: conversion from ‘basic_string<char>’ to non-scalar type ‘basic_string<wchar_t>’ requested
  191 |     std::wstring tmp = search_name.native();
      |                        ~~~~~~~~~~~~~~~~~~^~
make[2]: *** [Source/Core/Core/CMakeFiles/core.dir/build.make:3124: Source/Core/Core/CMakeFiles/core.dir/PrimeHack/Mods/ElfModLoader.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1148: Source/Core/Core/CMakeFiles/core.dir/all] Error 2
make: *** [Makefile:171: all] Error 2

from ishiiruka.

Linskun avatar Linskun commented on August 28, 2024

Another info that i forgot to report : i use GCC 10.2 that is the latest version on Linux.
The G++20 std::lerp was introduced with GCC9 so i'm full compliant with it (see the changelog here )
So i think that the CMakeFile don't pass the correct flag for C++20 when compiler different that MSVC is found

from ishiiruka.

thejacer87 avatar thejacer87 commented on August 28, 2024

Happy new Year !

I'm using the latest version of GCC & CLANG
I've checked on CMakeLists.txt and found that it check for CXX17 and pass -std=c++17.
For C++20 shouldn't it check the CXX20 support and pass -std=c++20 parameter ?

Ok now i don't have anymore problem on FPSControl.cpp.o but it give me another error :

/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘MENU’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘MENU_PRIME_1’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘MENU_PRIME_2’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_1’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_2’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_3’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_3_STANDALONE’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_2_GCN’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘MAX_VAL’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp: In member function ‘std::optional<std::__cxx11::basic_string<char> > prime::ElfModLoader::parse_elfpath(const string&, const string&)’:
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:191:42: error: conversion from ‘basic_string<char>’ to non-scalar type ‘basic_string<wchar_t>’ requested
  191 |     std::wstring tmp = search_name.native();
      |                        ~~~~~~~~~~~~~~~~~~^~
make[2]: *** [Source/Core/Core/CMakeFiles/core.dir/build.make:3124: Source/Core/Core/CMakeFiles/core.dir/PrimeHack/Mods/ElfModLoader.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1148: Source/Core/Core/CMakeFiles/core.dir/all] Error 2
make: *** [Makefile:171: all] Error 2

im getting the same error here on manjaro linux

from ishiiruka.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.