Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Build without GCC: cmdline.h depends on #include <cxxabi.h> #18

Open
chaojian-zhang opened this issue Feb 6, 2023 · 1 comment

Comments

@chaojian-zhang
Copy link

chaojian-zhang commented Feb 6, 2023

Awesome utility program and thanks for sharing it on Github!

Currently cannot build with MSVC due to "fatal error C1083: Cannot open include file: 'cxxabi.h': No such file or directory".

The root cause is the dependency on this abi::__cxa_demangle() in this code section:

static inline std::string demangle(const std::string &name)
{
  int status=0;
  char *p=abi::__cxa_demangle(name.c_str(), 0, 0, &status);
  std::string ret(p);
  free(p);
  return ret;
}

Also see: PDAL/PDAL#335 - similar issue, might offer similar solution.

@chaojian-zhang
Copy link
Author

chaojian-zhang commented Feb 6, 2023

Not sure what demangle does, but following the solution here, one can replace the mentioned function with the following, as shown in my fork (Charles-Zhang-Fork@2a9a6cb):

static inline std::string demangle(const std::string &name)
{
    return std::string(name);
}

Functionality wise speaking, the program seems to compile and run fine afterwards😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant