Comments (7)
Can you try to enable Options.Verbose and paste the output under both here?
It should output header search paths for each file it tries to parse.
from cppsharp.
Yes, sure. Here it is. Actually now that I see this is it supposed to show like this twice? I think with the CppSharp_VS2012_423 it only shows once the
ignoring nonexistent directory ".\lib\clang\3.5\include" etc
Parsing libraries...
Indexing library symbols...
Parsing code...
ignoring nonexistent directory ".\lib\clang\3.5\include"
#include "..." search starts here:
#include <...> search starts here:
PATH_TO_3RDPARTY_DIR
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include
C:\Program Files (x86)\Windows Kits\8.0\include
End of search list.
Error parsing 'PATH_TO_3RDPARTY_DIR\PARTY_HEADER.h'
PATH_TO_3RDPARTY_DIR\PARTY_HEADER.h(156,68): warning: invalid suffix on literal; C++11 requires a space
between literal and identifier
PATH_TO_3RDPARTY_DIR\PARTY_HEADER.h(1806,10): fatal: 'windows.h' file not found
ignoring nonexistent directory ".\lib\clang\3.5\include"
#include "..." search starts here:
#include <...> search starts here:
PATH_TO_3RDPARTY_DIR
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include
C:\Program Files (x86)\Windows Kits\8.0\include
End of search list.
Processing code...
Pass 'CppSharp.Passes.CleanUnitPass'
Pass 'CppSharp.Passes.SortDeclarationsPass'
Pass 'CppSharp.Passes.ResolveIncompleteDeclsPass'
Pass 'CppSharp.Passes.CheckIgnoredDeclsPass'
Pass 'CppSharp.Passes.GenerateInlinesCodePass'
Pass 'CppSharp.Passes.FindSymbolsPass'
Pass 'CppSharp.Passes.CheckStaticClass'
Pass 'CppSharp.Passes.MoveOperatorToClassPass'
Pass 'CppSharp.Passes.MoveFunctionToClassPass'
Pass 'CppSharp.Passes.CheckAmbiguousFunctions'
Pass 'CppSharp.Passes.CheckOperatorsOverloadsPass'
Pass 'CppSharp.Passes.CheckVirtualOverrideReturnCovariance'
Pass 'CppSharp.Passes.CheckAbiParameters'
Pass 'CppSharp.Passes.FieldToPropertyPass'
Pass 'CppSharp.Passes.CleanInvalidDeclNamesPass'
Pass 'CppSharp.Passes.CheckIgnoredDeclsPass'
Pass 'CppSharp.Passes.CheckFlagEnumsPass'
Pass 'CppSharp.Passes.CheckDuplicatedNamesPass'
Generating code...
from cppsharp.
Does the latest version find the same include search paths as CppSharp_VS2012_423?
Since you only seem to have provided the latest version output I cannot compare them myself.
Anyway, the Windows include path seems to be in the paths found by the compiler, so I'm not sure what causes the failure here. Can you check that the path exists and has "windows.h" inside?
from cppsharp.
Here is the old one and the paths are different:
Parsing libraries...
Indexing library symbols...
Parsing code...
ignoring nonexistent directory ".\lib\clang\3.4\include"
#include "..." search starts here:
#include <...> search starts here:
PATH_TO_3RDPARTY_DIR
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include
End of search list.
Unhandled type class 'Attributed'
Unhandled type class 'Attributed'
Parsed 'PATH_TO_3RDPARTY_DIR\PARTY_HEADER.h'
PATH_TO_3RDPARTY_DIR\PARTY_HEADER.h(156,68): warning: invalid suffix on literal; C++11 requires a space
between literal and identifier
Processing code...
Invalid operator overload Test::Equal
Generating code...
Generated 'Test.cs'
Are you talking about C:\Program Files (x86)\Windows Kits\8.0\include ?
I don't think this has windows.h file in it. It has three folders (shared, um, WinRT)
If I add manually C:\Program Files (x86)\Windows Kits\8.0\include\um that has windows.h in it, the application takes forever to run and crashes with a NotSupportedException in VisitArrayType in CppTypePrinter
from cppsharp.
Do you have both VS 2012 and VS 2013 (or a recent Windows SDK) installed?
Old versions of CppSharp ignored versions newer than 2013 if an older version of VS was found since Clang had some problems parsing new Windows SDK versions. We changed that not too long ago to choose 2013 headers if available.
There's a workaround which you can try using. In the parser options structure, there's public int ToolSetToUse;
which takes the MS toolset version you want to target as an integer. IIRC for VS2012 you can set it to 1700
which will force it to choose VS2012 headers.
from cppsharp.
I only have VS 2012.
I set the options.ToolSetToUse = 1700;
but did not help. I get the same include paths.
Actually, I see that you already have that in Parser.cpp
if (Opts->MicrosoftMode)
{
LangOpts.MSCVersion = Opts->ToolSetToUse;
if (!LangOpts.MSCVersion) LangOpts.MSCVersion = 1700;
}
ToolSetToUse appears to be 0 by default
from cppsharp.
Are you still facing this problem?
from cppsharp.
Related Issues (20)
- DllNotFoundException on Linux HOT 1
- Disable string Marshaller usage in C# HOT 2
- Ref/out value type method params not working correctly HOT 6
- Not work. The Nuget package, for 2022 HOT 1
- Enum items not expanded when being used as arguments to constructor in default argument
- Missing implementations for GenericAArch64 ABI
- DllImport from .exe
- LLVM.lua does not get VS version from build.sh ("Error finding an LLVM build") HOT 1
- CppSharp.Runtime.UTF8Marshaller Included in generated source HOT 1
- Method with std::function parameter is not generated HOT 1
- Mapping a type to a type of the same name causes stack overflow
- Constructor/delegate mapping? HOT 2
- How to do download latest version nugget packages
- error: no member named 'string_view' in namespace 'std'
- Add support for Haiku HOT 3
- System.AccessViolationException Attempted to read or write protected memory HOT 5
- Update Xcode toolchain locations for Xcode 15 HOT 2
- Add ARM64 dynamic libraries to NuGet package
- -target-framework is not working HOT 1
- typedef error Cannot marshal argument of function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppsharp.