0

I'm using Microsoft Visual Studio 2022 version and I'm getting this error when trying to compile my project which depends on this cmdline open source project.

cmdline.h(39,10): fatal error : 'cxxabi.h' file not found

How to fix this error?

jeffbRTC
  • 1,941
  • 10
  • 29
  • I'm not seeing the `cxxabi.h` include in https://github.com/FlorianRappl/CmdParser/blob/master/cmdparser.hpp – HolyBlackCat Jan 10 '22 at 19:24
  • @HolyBlackCat Link fixed. I didn't like the lib name so I changed the name.. – jeffbRTC Jan 10 '22 at 19:26
  • Well, the lib doesn't support MSVC it seems. But the fix is easy: replace their `readable_typename()` function with [this one](https://stackoverflow.com/a/59522794/2752075), which doesn't need ``. Or check out one of the several unmerged PRs that fix MSVC compatibility. – HolyBlackCat Jan 10 '22 at 19:29
  • I do see it on line 39. A search says it is in [libstc++](https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-api-4.6/dir_00818abdbffa3fdf9d4e4b8402db6c97.html). – lakeweb Jan 10 '22 at 19:29
  • @lakeweb The link was edited since I posted the comment. :| – HolyBlackCat Jan 10 '22 at 19:30
  • Ah, ok @HolyBlackCat I get what that means. – lakeweb Jan 10 '22 at 19:31
  • How about just use [Boost Program Options](https://www.boost.org/doc/libs/1_78_0/doc/html/program_options.html)? I use it and it works very well. – lakeweb Jan 10 '22 at 19:34
  • @lakeweb Large refactoring ;( – jeffbRTC Jan 10 '22 at 20:05
  • @HolyBlackCat They don't have anything called `readable_typename()`, what they have is `char *p=abi::__cxa_demangle(name.c_str(), 0, 0, &status);` – jeffbRTC Jan 10 '22 at 20:08
  • `readable_typename()` is 7 lines below that line. – HolyBlackCat Jan 10 '22 at 20:12
  • @HolyBlackCat Yeah, I found it. I also found complete answer in an issue of their repo. – jeffbRTC Jan 10 '22 at 20:13

0 Answers0