Resolving Semantic Issues: UINT/LPARAM/BOOL/...
- Dominant language
- Dart
- Stars
- 275
- Forks
- 144
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 47
Description
Hello everybody,
so this is going to become a rookie question and I hope you can help somebody that hadn't too much contact with llvm/clang/....
I'm currently exploring if I could use Combit's List&Label (LL) from within a Windows Flutter App to handle some print jobs. We already use LL for other (non-flutter) projects at our company and so this would be an easy other use case.
[Combit offers a C/C++-API for their application](https://docu.combit.net/progref/en/#!Documents/programmingusingtheapi.htm) and I thought that I should be able to create the bindings for dart with ffigen. But I'm stumbling over some severe errors that I don't quite understand. This is the output of `dart run ffigen`:
```
Using complete dylib path: /opt/homebrew/Cellar/llvm/15.0.7_1/lib/libclang.dylib from llvm-path.
Input Headers: [./windows/ll/cmbtLL26.h]
[SEVERE] : Header ./windows/ll/cmbtLL26.h: Total errors/warnings: 20.
[SEVERE] : ./windows/ll/cmbtLL26.h:1589:3: error: unknown type name 'UINT' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1590:3: error: unknown type name 'LPARAM' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1591:3: error: unknown type name 'LPARAM' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1592:4: error: unknown type name 'UINT_PTR' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1597:3: error: unknown type name 'UINT' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1598:3: error: unknown type name 'HWND' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1599:3: error: unknown type name 'UINT' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1600:3: error: unknown type name 'UINT' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1601:3: error: unknown type name 'UINT' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1606:3: error: unknown type name 'UINT' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1607:3: error: unknown type name 'LPCSTR' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1608:3: error: unknown type name 'BOOL' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1610:4: error: unknown type name 'UINT' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1616:4: error: unknown type name 'UINT' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1617:4: error: unknown type name 'LPCWSTR' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1618:4: error: unknown type name 'BOOL' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1619:4: error: unknown type name 'WCHAR' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1620:4: error: unknown type name 'UINT' [Semantic Issue]
[SEVERE] : ./windows/ll/cmbtLL26.h:1621:4: error: unknown type name 'WCHAR' [Semantic Issue]
[SEVERE] : fatal error: too many errors emitted, stopping now
[WARNING]: Resolved name conflict: Declaration 'INT' and has been renamed to 'INT1'.
Finished, Bindings generated in /Users/markusgerards/Development/minervaprint/./lib/generated_bindings.dart
```
The above output is from macOS but I got exactly the same errors on my windows machine.
I think I'm not allowed (yet) to share the header file but if this is necessary I will ask Combit's support. But maybe you have some tipps and hints anyways to get this errors sorted. As I said above, I don't have deep knowledge of llvm/clang/c/... but to me some of the unknown type names sound very generic and I'm wondering if the stdlibrary could be missing or is it something else? Is this a C vs C++ problem?
Yes, I'm aware that ffigen does not support C++ headers but Combit calls it a C/C++ header, so I'm wondering if I can get this running...
Contributor guide
Assessment
This issue has not been assessed yet.