ivanseidel / ivanseidel/LinkedList

Example won't compile for Arduino Portenta

Open
#58 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
364
Forks
117
PR merge metrics
No merged PRs in 30d

Description

Compile command: arduino-cli compile ~/Arduino/libraries/LinkedList/examples/ClassList/ClassList.pde -b arduino:mbed_portenta:envie_m7 --libraries ~/Arduino/libraries/
Errors:
"
/home/cellula/Arduino/libraries/LinkedList/examples/ClassList/ClassList.ino: In function 'void setup()':
/home/cellula/Arduino/libraries/LinkedList/examples/ClassList/ClassList.ino:49:15: error: 'class LinkedList<Animal*>' has no member named 'add'
myAnimalList.add(cat);
^~~
/home/cellula/Arduino/libraries/LinkedList/examples/ClassList/ClassList.ino:50:15: error: 'class LinkedList<Animal*>' has no member named 'add'
myAnimalList.add(emu);
^~~
/home/cellula/Arduino/libraries/LinkedList/examples/ClassList/ClassList.ino:51:15: error: 'class LinkedList<Animal*>' has no member named 'add'
myAnimalList.add(dog);
^~~
/home/cellula/Arduino/libraries/LinkedList/examples/ClassList/ClassList.ino: In function 'void loop()':
/home/cellula/Arduino/libraries/LinkedList/examples/ClassList/ClassList.ino:57:28: error: 'class LinkedList<Animal*>' has no member named 'size'
Serial.print(myAnimalList.size());
^~~~
/home/cellula/Arduino/libraries/LinkedList/examples/ClassList/ClassList.ino:62:34: error: 'class LinkedList<Animal*>' has no member named 'size'
for(int i = 0; i < myAnimalList.size(); i++){
^~~~
/home/cellula/Arduino/libraries/LinkedList/examples/ClassList/ClassList.ino:65:25: error: 'class LinkedList<Animal*>' has no member named 'get'
animal = myAnimalList.get(i);
^~~

Error during build: exit status 1
"

Arduino CLI version 0.20.2
Arduino Portenta core version 2.6.1
LinkedList library version 1.3.2

Compiles for Arduino Mega after deleting tests.cpp.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the reported arduino-cli compile command for examples/ClassList/ClassList.ino on the Portenta core, then inspect the example and _tests.cpp, since removing _tests.cpp is reported to make the library compile on Mega. Compare the resulting build behavior across Portenta and Mega; done means the ClassList example compiles on Portenta without breaking the Mega build.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, cpp
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.