TMRh20 / TMRpcm

Arduino library for asynchronous playback of PCM/WAV files direct from SD card. Arduino Uno,Nano,Mega etc supported
http://tmrh20.blogspot.com
593 stars 178 forks source link

I got it to work on some of the example code, but it still gives me an error message. #154

Closed Nonsensible closed 3 years ago

Nonsensible commented 3 years ago

Everytime i try to verify the code it says, "collect2: error: ld returned 1 exit status"

Nonsensible commented 3 years ago

I even found some code of someone else using it and it still says collect2: error: Id returned 1 exit status

Nonsensible commented 3 years ago

So i have this code: `#include

include // audio from SD library

include "Wire.h"

include "I2Cdev.h"

TMRpcm tmrpcm;

void setup(){ tmrpcm.speakerPin = 9; tmrpcm.play("startup.wav"); }

void loop(){
if(Serial.available()){
if(Serial.read() == "on"){ tmrpcm.play("ignite.wav"); } } if(Serial.available()){
if(Serial.read() == "off"){ tmrpcm.play("retract.wav"); } } if(Serial.available()){
if(Serial.read() == "while"){ tmrpcm.play("hum.wav"); } } } ` And it works fine on it's own, but when I combine it with other things, it just gives me the error message.

Nonsensible commented 3 years ago

Is it incompatible with other libraries or something?

Nonsensible commented 3 years ago

here is the full error message: Multiple libraries were found for "MPU6050.h"

Used: /home/builder/opt/libraries/latest/mpu6050_0_2_1

Not used: /home/builder/opt/libraries/latest/grove_imu_9dof_1_0_0

Multiple libraries were found for "TMRpcm.h"

Used: /tmp/615144538/custom/TMRpcm

Not used: /home/builder/opt/libraries/latest/tmrpcm_1_1_0

Multiple libraries were found for "Adafruit_NeoPixel.h"

Used: /home/builder/opt/libraries/latest/adafruit_neopixel_1_8_0

Not used: /home/builder/opt/libraries/latest/pinduino_1_5_0

Not used: /home/builder/opt/libraries/latest/leaphy_extra_extension_0_0_6

/tmp/615144538/build/libraries/TMRpcm/TMRpcm.cpp.o (symbol from plugin): In function `optionByte':

(.text+0x0): multiple definition of `b'

/tmp/615144538/build/sketch/NonsenseSaber.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

collect2: error: ld returned 1 exit status

exit status 1

Nonsensible commented 3 years ago

Nevermind I found the issue. Just a compatibility issue and I need to find a way around it.