-
Notifications
You must be signed in to change notification settings - Fork 6
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
Incorrent generation C++ files #13
Comments
Maybe follow code is reason?
|
Yes, i'il try uncomment addRef and get following code: #include "Main.h"
#include <Arduino.h>
#include <LinkedList.h>
#define Util_addressOf(x) (byte*)&x
void Main::setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void Main::loop() {
digitalWrite(LED_BUILTIN, HIGH);
LinkedList<int> s;
s.add(1);
s.add(2);
s.add(3);
s.add(4);
LinkedList<int> w;
w.add(4);
w.add(5);
LinkedList<int> d = s.concat(w);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
void Main::main() {
}
but compiler throw error because method C:/git/hxArduino/examples/01-blink/build/hxArduino/src/Main.cpp:23:27: error: 'class LinkedList<int>' has no member named 'concat'
LinkedList<int> d = s.concat(w);
^~~~~~
In file included from C:/git/hxArduino/examples/01-blink/build/hxArduino/src/Main.cpp:3:0:
C:/git/hxArduino/examples/01-blink/build/hxArduino/include/LinkedList.h: In instantiation of 'ListNode<T>* LinkedList<T>::getNode(int) [with T = int]':
C:/git/hxArduino/examples/01-blink/build/hxArduino/include/LinkedList.h:185:22: required from 'bool LinkedList<T>::add(int, T) [with T = int]'
C:/git/hxArduino/examples/01-blink/build/hxArduino/src/Main.cpp:30:1: required from here
C:/git/hxArduino/examples/01-blink/build/hxArduino/include/LinkedList.h:167:9: error: cannot convert 'bool' to 'ListNode<int>*' in return
return false;
^~~~~
COMPILATION FAILED! |
Hi yeah, there are going to be things like this quite alot i think, where certain functions in haxe havent been mapped to some type of simple equivalent in hxArduino. Ive added concat now (and and c++ copy constructor) to LinkedList... i havent tested it on a device yet as ill have to hook one up (which will have to wait until later). Ive also uncommented that addRef... my guess is it was commented out for a reason, but not 100% sure what that is / was now! Let see what happens in the future! Cheers, |
i try compile follow code
and I get following C++ code:
Main.cpp
Main.h
And i see,
LinkedList.h
is not include in h file, but file available ininclude
outputI'm sorry, you must be tired of me, but im in process of learning haxe, so I can't really help with pull requests :(
The text was updated successfully, but these errors were encountered: