Open dmitrydvm opened 7 years ago
We were able to solve a similar problem with the Android NDK today. Could you please specify what system headers you use?
@ddobrev Only these. You say about them?
#include <string>
#include <functional>
#include <map>
#include <unordered_map>
@boodoolak I am sorry, I wasn't exact in my question. What I meant was: what environment provides your system headers? Is it MSVC, MinGW, Android NDK, sth else?
@ddobrev MSVS. The problem was solved just now after installing VS2017 and all components for c++. I'm sorry.
But now there is another problem:
Error parsing 'hhive.h'
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\xstring(1905,26): error: constexpr variable '_Memcpy_move_offset' must be initialized by a constant expression
Unfortunately I don't know c++. What does this error mean? How can I fix it?
It's probably related due to us using an "outdated" Clang revision that does not play nice with some of VS2017 headers. Using VS2015 or older for parsing is probably the most compatible right now.
By the way the initial issue could be caused by not setting up MSVC headers.
See SetupMSVC
method in https://github.com/mono/CppSharp/blob/a954c54a6cd2f84dedf987c2812f48ca2a8e8ee1/src/Parser/ParserOptions.cs#L17 .
After installing vs2017 old vs2015 began using the path from vs2017 (C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC...). I'll try to remove vs2017 and then reinstall vs2015. Most likely the problem is in the installation vs2015.
Yes, removing vs2017 is helped, Library was generated successfully.
That means this string?
The query API is not registered. Assuming no instances are installed.
Yes, this output means success. If you use the option for automatic compilation, your binding will also be compiled for you.
@ddobrev @tritao Thank you!
I added
options.CompileCode = true;
but compile failed
Compiling HiveLibrary... C:\dst\Output\HiveLibrary.cs(243,33) : error CS0234: The type or namespace name 'BasicString' does not exist in the namespace 'Std' (are you missing an assembly reference?)
Hi, I have this error. How can I fix it? C++# from Nuget.
OS: W10 AU x64, VS2015up3
Used headers
Used settings
Target: MSVC/GCC/Clang
Other settings
Stack trace or incompilable generated code