HaxeFoundation / HaxeFoundation/hxcpp

Building in ObjC mode with g++ on Linux

Open
#1,057 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
330
Forks
227
Avg merge
2d 16h
Merged PRs (30d)
18

Description

```
--dce full
--library haxe-strings
-m Main
--cpp cpp
-D objc
-D file_extension=mm
```

```





```

This gets me very close, but I get a bunch of parse errors from `ObjcHelpers.h` for some reason?

```
Error: Error while running command
g++ -Iinclude -c -fvisibility=hidden -O2 -fpic -fPIC -Wno-overflow -DHX_LINUX -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS -DHX_SMART_STRINGS -DHXCPP_API_LEVEL=430 -DHXCPP_OBJC -m64 -DHXCPP_M64 -I/usr/share/haxe/lib/hxcpp/4,3,2/include -x objective-c++ -Wno-invalid-offsetof -Wno-format-security -I/usr/include/GNUstep ./src/haxe/IMap.mm -o.../cpp/obj/linux64/f84b96e9_IMap.o

In file included from /usr/share/haxe/lib/hxcpp/4,3,2/include/hxcpp.h:369,
from ./src/haxe/NativeStackTrace.mm:2:
/usr/share/haxe/lib/hxcpp/4,3,2/include/hx/ObjcHelpers.h:14:23: error: expected ‘>’ before ‘*’ token
14 | NSDictionary *_hx_obj_to_nsdictionary(Dynamic d);
| ^
/usr/share/haxe/lib/hxcpp/4,3,2/include/hx/ObjcHelpers.h:14:23: error: cannot find protocol declaration for ‘NSString’
/usr/share/haxe/lib/hxcpp/4,3,2/include/hx/ObjcHelpers.h:14:24: error: expected unqualified-id before ‘,’ token
14 | NSDictionary *_hx_obj_to_nsdictionary(Dynamic d);
| ^
/usr/share/haxe/lib/hxcpp/4,3,2/include/hx/ObjcHelpers.h:14:28: error: expected initializer before ‘>’ token
14 | NSDictionary *_hx_obj_to_nsdictionary(Dynamic d);
| ^
/usr/share/haxe/lib/hxcpp/4,3,2/include/hx/ObjcHelpers.h:19:46: error: cannot find protocol declaration for ‘NSString’
19 | Dynamic _hx_nsdictionary_to_obj(NSDictionary *inDictionary);
| ^~~~~~~~
/usr/share/haxe/lib/hxcpp/4,3,2/include/hx/ObjcHelpers.h:19:46: error: cannot find protocol declaration for ‘NSString’
/usr/share/haxe/lib/hxcpp/4,3,2/include/hx/ObjcHelpers.h:19:45: error: expected primary-expression before ‘<’ token
19 | Dynamic _hx_nsdictionary_to_obj(NSDictionary *inDictionary);
| ^
/usr/share/haxe/lib/hxcpp/4,3,2/include/hx/ObjcHelpers.h:19:55: error: expected primary-expression before ‘*’ token
19 | Dynamic _hx_nsdictionary_to_obj(NSDictionary *inDictionary);
| ^
/usr/share/haxe/lib/hxcpp/4,3,2/include/hx/ObjcHelpers.h:19:56: error: expected primary-expression before ‘,’ token
19 | Dynamic _hx_nsdictionary_to_obj(NSDictionary *inDictionary);
| ^
/usr/share/haxe/lib/hxcpp/4,3,2/include/hx/ObjcHelpers.h:19:60: error: expected primary-expression before ‘>’ token
19 | Dynamic _hx_nsdictionary_to_obj(NSDictionary *inDictionary);
| ^
/usr/share/haxe/lib/hxcpp/4,3,2/include/hx/ObjcHelpers.h:19:63: error: ‘inDictionary’ was not declared in this scope; did you mean ‘NSDictionary’?
19 | Dynamic _hx_nsdictionary_to_obj(NSDictionary *inDictionary);
| ^~~~~~~~~~~~
| NSDictionary
/usr/share/haxe/lib/hxcpp/4,3,2/include/hx/ObjcHelpers.h:33:18: error: expected unqualified-id before ‘^’ token
33 | typedef void (^t)();
| ^
/usr/share/haxe/lib/hxcpp/4,3,2/include/hx/ObjcHelpers.h:33:18: error: expected ‘)’ before ‘^’ token
33 | typedef void (^t)();
| ~^
| )
/usr/share/haxe/lib/hxcpp/4,3,2/include/hx/ObjcHelpers.h:35:11: error: ‘t’ does not name a type; did you mean ‘tm’?
35 | static t create(Dynamic func)
| ^
| tm
```

Any ideas what could be going wrong here? It almost looks like it is not using the objc parser, but it should not include this file unless it is, and also the file doing the inclusion is a `.mm` file and you can see the `-x objective-c++` in the invocation of g++...

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.