Collect2.exe: error: ld returned 1 exit status

I am having the same issue but a little different

C:\Users\dell\AppData\Local\Temp\ccuXfWTX.ltrans0.ltrans.o: In function `setup':
C:\Users\dell\Documents\Arduino\sketch_dec29a/sketch_dec29a.ino:16: undefined reference to `setup::SevenSeg::SevenSeg(int, int, int, int, int, int, int)'
C:\Users\dell\Documents\Arduino\sketch_dec29a/sketch_dec29a.ino:22: undefined reference to `setup::SevenSeg::write(int)'
C:\Users\dell\Documents\Arduino\sketch_dec29a/sketch_dec29a.ino:32: undefined reference to `setup::SevenSeg::write(int)'
C:\Users\dell\AppData\Local\Temp\ccuXfWTX.ltrans0.ltrans.o: In function `main':
C:\Users\dell\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/main.cpp:46: undefined reference to `loop'
collect2.exe: error: ld returned 1 exit status
`

exit status 1

Compilation error: exit status 1

I've moved you question to a dedicated topic. Please do not hijack other topics; the symptoms might be the same but the root cause can be different.

One thing stands out

So you code does not contain a loop() function what is a requirement as it's called from main().

The same applies to the other functions mentioned in the error message.

Please post your code (please do not forget the code tags) and tell us for which board you are compiling.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.