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

Unable to build using Clang after including system header in C++ #36

Open
akashnagapure opened this issue Dec 2, 2020 · 0 comments
Open

Comments

@akashnagapure
Copy link

akashnagapure commented Dec 2, 2020

I'm trying to run given shellscript for my own c++ file with some syteam headers(e.g iostream, vector ) but getting below error while build .

Build for x86:
Compiling and linking (output as dynamic library)
In file included from D:/MathFuncs/mobcat-samples/cpp_with_xamarin/Sample/MathFuncsLib/tmp/sourceFiles/MyMathFuncs.cpp:2:
In file included from C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include/c++/v1\iostream:37:
In file included from C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include/c++/v1\ios:214:
In file included from C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include/c++/v1\iosfwd:95:
In file included from C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include/c++/v1\wchar.h:118:
In file included from C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/local/include\wchar.h:32:
In file included from C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include\wchar.h:33:
In file included from C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include/c++/v1\stdio.h:107:
In file included from C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include\stdio.h:42:
In file included from C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include\sys/types.h:33:
In file included from C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include/c++/v1\stdint.h:123:
In file included from C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\lib64\clang\9.0.8\include\stdint.h:11:
C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\lib64\clang\9.0.8\include\vcruntime.h:96:1: error: C++ requires a type specifier for all declarations
_CRT_BEGIN_C_HEADER
^
C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\lib64\clang\9.0.8\include\vcruntime.h:69:9: note: expanded from macro '_CRT_BEGIN_C_HEADER'
__pragma(pack(push, _CRT_PACKING))
^
C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\lib64\clang\9.0.8\include\vcruntime.h:96:1: error: use of undeclared identifier 'push'
C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\lib64\clang\9.0.8\include\vcruntime.h:69:23: note: expanded from macro '_CRT_BEGIN_C_HEADER'
__pragma(pack(push, _CRT_PACKING))
^
C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\lib64\clang\9.0.8\include\vcruntime.h:96:1: error: expected ';' after top level declarator
C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\lib64\clang\9.0.8\include\vcruntime.h:70:9: note: expanded from macro '_CRT_BEGIN_C_HEADER'
extern "C" {
^
C:\Users\xyz\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\lib64\clang\9.0.8\include\vcruntime.h:228:22: error: 'short wchar_t' is invalid
typedef unsigned short wchar_t;
^

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