ivanseidel / LinkedList

🔗 A fully implemented LinkedList made to work with general Microcontrollers and Arduino projects
MIT License
347 stars 120 forks source link

Compile errors with 1.8.10 arduino ide #33

Closed mdlagor closed 2 years ago

mdlagor commented 5 years ago

Hello, I get these compilation errors using your lib in Arduino 1.8.10 ide:

home/user/Arduino/libraries/LinkedList/LinkedList.h: In instantiation of 'ListNode LinkedList::getNode(int) [with T = Transition]': /home/user/Arduino/libraries/LinkedList/LinkedList.h:314:28: required from 'T LinkedList::get(int) [with T = Transition]' /home/user/Arduino/libraries/StateMachine/src/State.h:83:32: required from here /home/user/Arduino/libraries/LinkedList/LinkedList.h:160:9: error: cannot convert 'bool' to 'ListNode<Transition>' in return return false; ^~~~~ /home/user/Arduino/libraries/LinkedList/LinkedList.h: In instantiation of 'ListNode LinkedList::getNode(int) [with T = State]': /home/user/Arduino/libraries/LinkedList/LinkedList.h:314:28: required from 'T LinkedList::get(int) [with T = State]' /home/user/Arduino/libraries/StateMachine/src/StateMachine.h:54:41: required from here /home/user/Arduino/libraries/LinkedList/LinkedList.h:160:9: error: cannot convert 'bool' to 'ListNode<State>' in return

With Arduino ide 1.8.9 these errors are warnings and I can compile but with the new version 1.8.10 I can't Thank you very much and best regards

burner- commented 4 years ago

Looks that arduino ide provide old broken version of lib instead of current git version.

spymastermatt commented 4 years ago

@burner- is correct, the latest version on git fixes this issue. The arduino IDE ships with the latest release (1.2.3 as i write this), which does not contain the fix. An easy fix while you wait is to find line 160 in LinkedList.h (/home/user/Arduino/libraries/LinkedList/LinkedList.h for the OP) and change return false to return NULL

strykeroz commented 4 years ago

IDE 1.8.13 still has this issue. Thanks for resolving it here.

UUID-2414 commented 3 years ago

Had the same errors as mdlagor, an update from GitHub fixed it. I guess the IDE still has an older version as of now, 10.04.2021 Thanks for pointing us towards the GitHub here.

ivanseidel commented 2 years ago

Should be fixed