# Compile errors with Electron but not with Photon in TinyGPS++.h

**URL:** <https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478>\
**Category:** Troubleshooting\
**Created:** [February 22, 2017, 3:21pm UTC](https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478 "2017-02-22T15:21:57Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jibeset](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jibeset/32/13227_2.png) [@Jibeset](https://community.particle.io/u/Jibeset)\
**Post date:** [February 22, 2017, 3:21pm UTC](https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478/1 "2017-02-22T15:21:57Z")

</div>

I am using the Desk Top DE and the TinyGPS++ libraries.

When I select a Photon device, the code compiles without errors.

When I select the Electron device, I get the following errors:  
"expected unqualified-id before 'double’  
TinyGPS++.h:38:16"  
line 38: double radians(double deg);

{the error repeats fro all lines of code with the same structure}

The same code compiled for Electron without errors on 2/20/17

---

<div class="post-metadata">

**Author:** ![mike\_b](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@mike\_b](https://community.particle.io/u/mike_b)\
**Post date:** [February 22, 2017, 3:32pm UTC](https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478/2 "2017-02-22T15:32:08Z")

</div>

I’m having the exact same issue. Was compiling fine yesterday (2/21/2017) and today it won’t compile.

---

<div class="post-metadata">

**Author:** ![Jibeset](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jibeset/32/13227_2.png) [@Jibeset](https://community.particle.io/u/Jibeset)\
**Post date:** [February 22, 2017, 3:34pm UTC](https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478/3 "2017-02-22T15:34:06Z")

</div>

Here is the simple code:

```cpp
// Tracking using external GPS
// External GPS - 4800 baud NMEA
//

#include "Particle.h"

// Port of TinyGPS for the Particle AssetTracker
// https://github.com/mikalhart/TinyGPSPlus
#include "TinyGPS++.h"
SYSTEM_THREAD(ENABLED);
/*
This sample sketch demonstrates the normal use of a TinyGPS++ (TinyGPSPlus) object directly.
*/

// The TinyGPS++ object
TinyGPSPlus gps;

void setup()
{

}

// Loop reading and processing GPS data
void loop()
{

	while (Serial1.available() > 0) {
    if (gps.encode(Serial1.read())) {
      displayInfo();
    }
  }
}

// Process GPS data
void displayInfo()
{
}

```

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [February 22, 2017, 3:43pm UTC](https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478/4 "2017-02-22T15:43:36Z")

</div>

can you check what system version you are targeting?

---

<div class="post-metadata">

**Author:** ![mike\_b](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@mike\_b](https://community.particle.io/u/mike_b)\
**Post date:** [February 22, 2017, 3:49pm UTC](https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478/5 "2017-02-22T15:49:24Z")

</div>

I was using the CLI without a target version specified. I just tried adding “–target 0.6.0” as a parameter, and now it compiles successfully. Nice!

So what version was it using when I didn’t pass in the target parameter, and why doesn’t that work anymore?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [February 22, 2017, 3:55pm UTC](https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478/6 "2017-02-22T15:55:23Z")

</div>

Not sure, Dev (Desktop IDE) should use the current default (0.6.0) - testing why not.  
But AFAIK the target selection should be comming soon for Dev too

* * *

_Update:_  
Above code builds for me in Dev just fine for an Electron.

---

<div class="post-metadata">

**Author:** ![Jibeset](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jibeset/32/13227_2.png) [@Jibeset](https://community.particle.io/u/Jibeset)\
**Post date:** [February 22, 2017, 4:44pm UTC](https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478/7 "2017-02-22T16:44:24Z")

</div>

Does not DEV always use the latest release of the firmware - 0.6.0? This is the firmware that I have loaded on all my devices. Still does not compile in my environment - any suggestions?

---

<div class="post-metadata">

**Author:** ![mike\_b](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@mike\_b](https://community.particle.io/u/mike_b)\
**Post date:** [February 22, 2017, 4:47pm UTC](https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478/8 "2017-02-22T16:47:27Z")

</div>

It doesn’t compile in Dev for me either, but I’m working around it for now by using CLI.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [February 22, 2017, 5:01pm UTC](https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478/9 "2017-02-22T17:01:51Z")

</div>

That’s odd, since it builds fine for me against any Particle device.

 ![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/a/a6c5663ff3500faf804276b627a98f63437eb37d.png)

---

<div class="post-metadata">

**Author:** ![Jibeset](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jibeset/32/13227_2.png) [@Jibeset](https://community.particle.io/u/Jibeset)\
**Post date:** [February 22, 2017, 11:08pm UTC](https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478/10 "2017-02-22T23:08:16Z")

</div>

I believed you. I have been out running errands for a few hours, came back and now it works with both devices without any errors - a puzzle and kind of scary because the compile errors were is C++ statement which should be independent of the device. Thank you for your help.

---

<div class="post-metadata">

**Author:** ![philbert](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@philbert](https://community.particle.io/u/philbert)\
**Post date:** [April 10, 2017, 6:01pm UTC](https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478/11 "2017-04-10T18:01:25Z")

</div>

Hey guys,

sorry for bouncing the old thread - I came across it when trying to compile an electron project using TinyGPS++

I have an electron asset tracker with firmware 0.6.1. When I try to compile (Particle Dev) the above example for this firmware version, I get the errors mentioned initially in this thread:  
"expected unqualified-id before ‘double’ TinyGPS++.h

I also tried using CLI for compiling (particle compile electron --target 0.6.1) and got the same result. However, compiling for an old firmware (particle compile electron --target 0.6.0) works fine. I am stuck at this - I need to compile the code for 0.6.1. Thank you for your help!

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [April 10, 2017, 7:01pm UTC](https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478/12 "2017-04-10T19:01:49Z")

</div>

0.6.1 has some difficulties with some libs due to some mixup with the Arduino compatibility features added.

Try building for 0.6.2-rc.1, 0.6.1-rc.1 or 0.6.1-rc.2

---

<div class="post-metadata">

**Author:** ![bryansosa](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@bryansosa](https://community.particle.io/u/bryansosa)\
**Post date:** [April 16, 2017, 9:25pm UTC](https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478/13 "2017-04-16T21:25:18Z")

</div>

I am having the same exact issue… any updates on this?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [April 17, 2017, 5:54am UTC](https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478/14 "2017-04-17T05:54:44Z")

</div>

Have you tried a different target?  
That would be the minimum info that could be expected in addition to: “Same here”

---

<div class="post-metadata">

**Author:** ![gularsen](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@gularsen](https://community.particle.io/u/gularsen)\
**Post date:** [April 19, 2017, 1:28pm UTC](https://community.particle.io/t/compile-errors-with-electron-but-not-with-photon-in-tinygps-h/29478/15 "2017-04-19T13:28:07Z")

</div>

Hello, I am experiencing the same issue it seems like. Tried to compile TinyGPS++ against an Electron with version 0.6.1 and it fails with the errors mentioned above:

"expected unqualified-id before 'double’  
TinyGPS++.h:38:16"  
line 38: double radians(double deg);

Tried to compile with version 0.6.0 and it worked ok. Also compiled ok with 0.6.2.rc1.
