Giter Site home page Giter Site logo

ashbf's Issues

error: use of dynamic_cast requires -frtti

When I execute ninja -j 3, following error appears:

[1/15] Building CXX object CMakeFiles/ashbf.dir/cmake_pch.hxx.pch
FAILED: CMakeFiles/ashbf.dir/cmake_pch.hxx.pch
D:\msys64\clang64\bin\clang++.exe -DFMT_USE_DOUBLE=0 -DFMT_USE_FLOAT=0 -DFMT_USE_LONG_DOUBLE=0 -IE:/_Projects/_Test/AshBF/vendor/fmt/include -flto=thin -fno-pic -fno-exceptions -fno-rtti -fno-asynchronous-unwind-tables -O3 -DNDEBUG -Wall -Wextra -std=c++20 -gsplit-dwarf -ggdb -O3 -DNDEBUG -Winvalid-pch -fpch-instantiate-templates -Xclang -emit-pch -Xclang -include -Xclang E:/_Projects/_Test/AshBF/build/CMakeFiles/ashbf.dir/cmake_pch.hxx -x c++-header -MD -MT CMakeFiles/ashbf.dir/cmake_pch.hxx.pch -MF CMakeFiles\ashbf.dir\cmake_pch.hxx.pch.d -o CMakeFiles/ashbf.dir/cmake_pch.hxx.pch -c E:/_Projects/_Test/AshBF/build/CMakeFiles/ashbf.dir/cmake_pch.hxx.cxx
In file included from <built-in>:1:
In file included from E:/_Projects/_Test/AshBF/build/CMakeFiles/ashbf.dir/cmake_pch.hxx:5:
In file included from E:/_Projects/_Test/AshBF/src/pch.hpp:17:
E:/_Projects/_Test/AshBF/vendor/fmt/include/fmt/ostream.h:95:19: error: use of dynamic_cast requires -frtti
  if (auto* buf = dynamic_cast<std::__stdoutbuf<char>*>(os.rdbuf()))
                  ^
1 error generated.
[2/15] Building CXX object vendor/fmt/CMakeFiles/fmt.dir/src/os.cc.obj
[3/15] Building CXX object vendor/fmt/CMakeFiles/fmt.dir/src/format.cc.obj
ninja: build stopped: subcommand failed.

If I remove -fno-rtti here:
https://github.com/AsuMagic/AshBF/blob/4c6269fc720353f39b86e125dea10f9e0abc429a/CMakeLists.txt#L12
, program builds fine and works correctly.

Compiler: clang version 15.0.7
OS: Windows 7 SP1 x64

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.