HaxeFoundation / HaxeFoundation/hxcpp
Abstract wrapping extern cannot find the extern
- Dominant language
- C++
- Stars
- 330
- Forks
- 227
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 18
Description
Example:
```
@:include("rtc/rtc.hpp")
@:native("rtc::Description::Type")
extern enum abstract DescriptionType(Int) {
var Unspec;
var Offer;
var Answer;
var Pranswer;
var Rollback;
}
abstract SdpType(DescriptionType) to DescriptionType from DescriptionType {
public static var OFFER = DescriptionType.Offer;
public static var PRANSWER = DescriptionType.Pranswer;
public static var ANSWER = DescriptionType.Answer;
public static var ROLLBACK = DescriptionType.Rollback;
}
```
I get error:
```
error: ‘rtc’ has not been declared
127 | HXDLIN( 68) ROLLBACK = rtc::Description::Type::Rollback;
```
This seems to be because a new file is generated for this class, but the includes for the extern are not brought across. I tried also adding `@:headerInclude` for the abstract, but it seems that is ignored.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.