Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when compiling to Android #4

Open
Skoo120 opened this issue Mar 2, 2016 · 5 comments
Open

Error when compiling to Android #4

Skoo120 opened this issue Mar 2, 2016 · 5 comments

Comments

@Skoo120
Copy link

Skoo120 commented Mar 2, 2016

Found an error when compiling to Android. It looks like it is caused by the Array

Error: In file included from ./src/haxpression/ExpressionType.cpp:4:0:
include/haxpression/ExpressionType.h:30:61: error: 'Array' is not a type
   static ::haxpression::ExpressionType Call(::String callee,Array< ::Dynamic > arguments);
                                                             ^
include/haxpression/ExpressionType.h:30:66: error: expected ',' or '...' before '<' token
   static ::haxpression::ExpressionType Call(::String callee,Array< ::Dynamic > arguments);
                                                                  ^
include/haxpression/ExpressionType.h:32:49: error: 'Array' is not a type
   static ::haxpression::ExpressionType Compound(Array< ::Dynamic > items);
                                                 ^
include/haxpression/ExpressionType.h:32:54: error: expected ',' or '...' before '<' token
   static ::haxpression::ExpressionType Compound(Array< ::Dynamic > items);
                                                      ^
./src/haxpression/ExpressionType.cpp:11:58: error: 'haxpression::ExpressionType haxpression::ExpressionType_obj::Array' is not a static member of 'class haxpression::ExpressionType_obj'
 ::haxpression::ExpressionType  ExpressionType_obj::Array(Array< ::Dynamic > items)
                                                          ^
./src/haxpression/ExpressionType.cpp:11:75: error: expected primary-expression before '>' token
 ::haxpression::ExpressionType  ExpressionType_obj::Array(Array< ::Dynamic > items)
                                                                           ^
./src/haxpression/ExpressionType.cpp:11:77: error: 'items' was not declared in this scope
 ::haxpression::ExpressionType  ExpressionType_obj::Array(Array< ::Dynamic > items)
                                                                             ^
./src/haxpression/ExpressionType.cpp:12:2: error: expected ',' or ';' before '{' token
  { return hx::CreateEnum< ExpressionType_obj >(HX_HCSTRING("Array","\x79","\xdd","\xbc","\xb8"),6,hx::DynamicArray(0,1).Add(items)); }
  ^
./src/haxpression/ExpressionType.cpp:17:73: error: 'Array' is not a type
 ::haxpression::ExpressionType  ExpressionType_obj::Call(::String callee,Array< ::Dynamic > arguments)
                                                                         ^
./src/haxpression/ExpressionType.cpp:17:78: error: expected ',' or '...' before '<' token
 ::haxpression::ExpressionType  ExpressionType_obj::Call(::String callee,Array< ::Dynamic > arguments)
                                                                              ^
./src/haxpression/ExpressionType.cpp: In static member function 'static haxpression::ExpressionType haxpression::ExpressionType_obj::Call(String, int)':
./src/haxpression/ExpressionType.cpp:18:136: error: 'arguments' was not declared in this scope
  { return hx::CreateEnum< ExpressionType_obj >(HX_HCSTRING("Call","\xbe","\x44","\x93","\x2c"),4,hx::DynamicArray(0,2).Add(callee).Add(arguments)); }
                                                                                                                                        ^
./src/haxpression/ExpressionType.cpp: At global scope:
./src/haxpression/ExpressionType.cpp:20:61: error: 'haxpression::ExpressionType haxpression::ExpressionType_obj::Compound' is not a static member of 'class haxpression::ExpressionType_obj'
 ::haxpression::ExpressionType  ExpressionType_obj::Compound(Array< ::Dynamic > items)
                                                             ^
./src/haxpression/ExpressionType.cpp:20:78: error: expected primary-expression before '>' token
 ::haxpression::ExpressionType  ExpressionType_obj::Compound(Array< ::Dynamic > items)
                                                                              ^
./src/haxpression/ExpressionType.cpp:20:80: error: 'items' was not declared in this scope
 ::haxpression::ExpressionType  ExpressionType_obj::Compound(Array< ::Dynamic > items)
                                                                                ^
./src/haxpression/ExpressionType.cpp:21:2: error: expected ',' or ';' before '{' token
  { return hx::CreateEnum< ExpressionType_obj >(HX_HCSTRING("Compound","\x8b","\x7f","\x81","\x5b"),7,hx::DynamicArray(0,1).Add(items)); }
  ^
@Shallowmallow
Copy link

Hi ! I found the solution :) It looks as if C doesn't anymore which Array we are talking about Just rename the array enum type in expression.hx into something else.
I renamed it ArrayExpression.
Then I looked for all Array(items in the other files and replaced them with ArrayExpression(items
.

@Shallowmallow
Copy link

Upping because the solution is easy. And I saw you've updated haxpression 5 days ago ;)

@ghost
Copy link

ghost commented Apr 27, 2016

Sorry, I just saw this, I will fix it now

@andywhite37
Copy link
Owner

Ok, I renamed the ExpressionType to all have an E (ELiteral, EArray, etc.) prefix (just for consistency, and to further avoid name conflicts). I hope this doesn't cause you too many headaches to change, but it felt right for consistency.

This is released in version 2.0.0.

I did add a python build and java build, but I'm currently getting an unexpected error from the haxe compiler for the java build. I think it is related to my other library graphx, so I will try to fix that in the next few days.

@andywhite37
Copy link
Owner

andywhite37 commented Apr 27, 2016

I'll leave the issue open until I can get the tests compiling and passing for java.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants