All libraies included, but error: Exit status 1

Hi,
here is a library <TinyGPS++.h> from github, that at first I had problems with installing it, locally and then on Create, finmally its installed on Create, but now the Compiler reports an error, relating to this library.
This is waht it reads:
Multiple libraries were found for “SoftwareSerial.h”

Used: /home/ubuntu/opt/cores/arduino/avr/libraries/SoftwareSerial

Not used: /home/ubuntu/opt/libraries/latest/printoo_library_1_0_2

Using library TinyGPS++ in folder: /tmp/076057132/custom/TinyGPS++ (legacy)

Using library SoftwareSerial at version 1.0 in folder: /home/ubuntu/opt/cores/arduino/avr/libraries/SoftwareSerial

/tmp/ccrUtPp4.ltrans0.ltrans.o: In function `__static_initialization_and_destruction_0’:

/tmp/076057132/how_to_easyGPSconnect_to_Arduino/how_to_easyGPSconnect_to_Arduino.ino:8: undefined reference to `TinyGPSPlus::TinyGPSPlus()’

/tmp/ccrUtPp4.ltrans0.ltrans.o: In function `loop’:

/tmp/076057132/how_to_easyGPSconnect_to_Arduino/how_to_easyGPSconnect_to_Arduino.ino:20: undefined reference to `TinyGPSPlus::encode(char)’

/tmp/076057132/how_to_easyGPSconnect_to_Arduino/how_to_easyGPSconnect_to_Arduino.ino:28: undefined reference to `TinyGPSLocation::lat()’

/tmp/076057132/how_to_easyGPSconnect_to_Arduino/how_to_easyGPSconnect_to_Arduino.ino:30: undefined reference to `TinyGPSLocation::lng()’

collect2: error: ld returned 1 exit status

exit status 1


I found the following include lib in this tinyGPS header lib:
“WProgram.h”
Could this be the problem?

appreciate any help, thanks
John

TinyGPS++.h (8.09 KB)

how_to_easyGPSconnect_to_Arduino.ino (2.01 KB)

johnguy:
I found the following include lib in this tinyGPS header lib:
"WProgram.h"
Could this be the problem?

Nope that is only included if your IDE has version less than 1.0

I downloaded the latest version of the library, and the code of your sketch and it compiles for me.
If multiple libraries were found for the software serial, something is not in the right place so sort that out.

Deva_Rishi:
I downloaded the latest version of the library, and the code of your sketch and it compiles for me.
If multiple libraries were found for the software serial, something is not in the right place so sort that out.

Thanks for that fast reply, I`ll check it out !
John

Ok,
Now I`ve got it working on the locally installed Arduino IDE, but on the online version, Create, still same Error: Exitstatus 1.

Also, SoftwareSerial.h doesn`t show up under libraries in Create.
here the comlete Compiler messages:


how_to_easyGPSconnect_to_Arduino

Arduino/Genuino Uno

SHARE
how_to_easyGPSconnect_to_Arduino.ino
ReadMe.adoc

./opt/arduino-builder/arduino-builder -compile -core-api-version 10611 -hardware opt/arduino-builder/hardware -hardware ./opt/cores -tools opt/arduino-builder/tools -tools ./opt/tools -built-in-libraries opt/libraries/latest -logger humantags -fqbn arduino:avr:uno -build-cache /tmp -build-path /tmp/650798739/build -verbose -prefs runtime.tools.avr-gcc.path=./opt/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2 -prefs runtime.tools.avrdude.path=./opt/tools/avrdude/6.3.0-arduino14 -prefs runtime.tools.arduinoOTA.path=./opt/tools/arduinoOTA/1.2.1 -libraries /tmp/650798739/custom -libraries /tmp/650798739/pinned /tmp/650798739/how_to_easyGPSconnect_to_Arduino

Multiple libraries were found for "SoftwareSerial.h"

Used: /home/ubuntu/opt/cores/arduino/avr/libraries/SoftwareSerial

Not used: /tmp/650798739/custom/SoftwareSerial

Not used: /home/ubuntu/opt/libraries/latest/printoo_library_1_0_2

Multiple libraries were found for "TinyGPS++.h"

Used: /tmp/650798739/custom/TinyGPS++

Not used: /tmp/650798739/custom/TinyGPSPlus

Using library SoftwareSerial at version 1.0 in folder: /home/ubuntu/opt/cores/arduino/avr/libraries/SoftwareSerial

Using library TinyGPS++ in folder: /tmp/650798739/custom/TinyGPS++ (legacy)

/tmp/ccQe9bnk.ltrans0.ltrans.o: In function `__static_initialization_and_destruction_0':

/tmp/650798739/how_to_easyGPSconnect_to_Arduino/how_to_easyGPSconnect_to_Arduino.ino:16: undefined reference to `TinyGPSPlus::TinyGPSPlus()'

/tmp/ccQe9bnk.ltrans0.ltrans.o: In function `loop':

/tmp/650798739/how_to_easyGPSconnect_to_Arduino/how_to_easyGPSconnect_to_Arduino.ino:28: undefined reference to `TinyGPSPlus::encode(char)'

/tmp/650798739/how_to_easyGPSconnect_to_Arduino/how_to_easyGPSconnect_to_Arduino.ino:36: undefined reference to `TinyGPSLocation::lat()'

/tmp/650798739/how_to_easyGPSconnect_to_Arduino/how_to_easyGPSconnect_to_Arduino.ino:38: undefined reference to `TinyGPSLocation::lng()'

collect2: error: ld returned 1 exit status

exit status 1


Do other people have similar problems with Arduino Create?

Appreciate any help,
John

Deva_Rishi:
If multiple libraries were found for the software serial, something is not in the right place so sort that out.

No, it just means that multiple installed libraries contain a file named SoftwareSerial.h. Unlike the Arduino IDE, the Arduino Web Editor comes with all 1875 libraries in the Arduino Library Manager index pre-installed. This means it is quite common for multiple libraries to match an #include directive. Luckily, the Arduino Web Editor displays this helpful message that shows which libraries contained that file and which one was chosen. That only indicates a problem when a different library from the intended one was chosen, in which case measures must be taken in order to make the intended library get preference. In this case, the correct library was chosen so there is nothing to be worried about.

Here's your clue:

johnguy:
Multiple libraries were found for "TinyGPS++.h"

Used: /tmp/650798739/custom/TinyGPS++

Not used: /tmp/650798739/custom/TinyGPSPlus

The TinyGPSPlus library contains a file TinyGPS++.cpp in addition to the TinyGPS++.h file you attached in this thread. It appears that for some reason you imported a library that only contains that .h file, which was saved to the folder /tmp/650798739/custom/TinyGPS++. It appears you also did a correct import of the full library, which was saved to the folder /tmp/650798739/custom/TinyGPSPlus. But note that the bad library was chosen over the good one (because preference is given to libraries whose folder name matches the file name). Since the library at /tmp/650798739/custom/TinyGPS++ is worthless, my recommendation for fixing this error is to delete it:

  • From the left sidebar, click "Libraries"
  • Click on the "Custom" tab.
  • Click the downward triangle next to "TinyGPS++"
  • Click "Delete Library".
  • Wait for the library deletion to finish.

After that, the sketch should now compile.

johnguy:
I found the following include lib in this tinyGPS header lib:
“WProgram.h”
Could this be the problem?

No, you need to look at the context of that line:

#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

Prior to the 1.0.0 release of the Arduino IDE, the primary file of the core library was named WProgram.h. Then in the 1.0.0 release, the file was renamed Arduino.h. The ARDUINO macro is defined with the IDE version (100 indicating 1.0.0). So what that code does is allow compatibility with all versions of the Arduino IDE. It even allows compatibility with the Wiring IDE, which using WProgram.h and does not define ARDUINO. That’s all ancient history now since nobody in their right mind would use a pre-1.0.0 version of the Arduino IDE or the long dead Wiring IDE. However, you will see this construct in many Arduino libraries which have a long history. It does no harm so there is no compelling reason to remove the code.

Thank Pert ! Worked right away!
In fact I noticed the missing cpp. but couldnt find how to delet a library, even when I googeld it, the consent was, that libraries couldnt be deleted in Create.
You`ve been a great help,
thanks
John

Only CUSTOM can be deleted.
They are ones you uploaded so that would be a reasonable step.

Favourites can only be UN-SELECTED.
These are included in the repositories so the un-select is again the only reasonable option.

Where there is more than one version of a specific library in the main REPO there is an option to select which particular one you want to use.

You're welcome. I'm glad to hear it's working now. Enjoy!
Per