bitbank2 / JPEGDEC

An optimized JPEG decoder for Arduino
Apache License 2.0
365 stars 47 forks source link

Undefined reference to 'Serial' error #50

Closed sandric closed 1 year ago

sandric commented 1 year ago

Hi, I tried to compile under Arduino IDE for rp pico 2040 mcu with "arduino-pico" compiler example jpeg_perf_test, and got these errors:


/home/sandric/Arduino/jpeg_perf_test/jpeg_perf_test.ino: In function 'int JPEGDraw(JPEGDRAW*)':
/home/sandric/Arduino/jpeg_perf_test/jpeg_perf_test.ino:3516:24: warning: unused parameter 'pDraw' [-Wunused-parameter]
 3516 | int JPEGDraw(JPEGDRAW *pDraw)
      |              ~~~~~~~~~~^~~~~
/home/sandric/.arduino15/packages/rp2040/tools/pqt-gcc/1.5.0-a-5007782/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: sketch/jpeg_perf_test.ino.cpp.o: in function `setup':
/home/sandric/Arduino/jpeg_perf_test/jpeg_perf_test.ino:3523: undefined reference to `_ZN17Adafruit_USBD_CDC5beginEm'
/home/sandric/.arduino15/packages/rp2040/tools/pqt-gcc/1.5.0-a-5007782/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: /home/sandric/Arduino/jpeg_perf_test/jpeg_perf_test.ino:3525: undefined reference to `Serial'
/home/sandric/.arduino15/packages/rp2040/tools/pqt-gcc/1.5.0-a-5007782/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: sketch/jpeg_perf_test.ino.cpp.o: in function `loop':
/home/sandric/Arduino/jpeg_perf_test/jpeg_perf_test.ino:3563: undefined reference to `Serial'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Waveshare RP2040 Plus 16MB.
bitbank2 commented 1 year ago

I'm able to recreate the error. I'll correct it.

sandric commented 1 year ago

Hmm, strangely, I just returned to my little project and looks like it all works.. I think mb it was some sort of an issue with installed adafruit sd library, not sure now. But that good news so I'll close the issue, thx.

bitbank2 commented 1 year ago

I was able to reproduce this problem and have just pushed a possible fix. Can you please give it a try?

sandric commented 1 year ago

@bitbank2 I checked and it looks like all working, but as I posted previously - I'm not sure what was wrong with my initial setup, but couple of days later I tried again, and everything compiled. So I guess it was some sort of mismatching libraries fault on my local machine.

bitbank2 commented 1 year ago

ok, thanks for checking.