SlashDevin / NeoGPS

NMEA and ublox GPS parser for Arduino, configurable to use as few as 10 bytes of RAM
GNU General Public License v3.0
708 stars 195 forks source link

never seen these problems from a library.. any Ideas? #72

Closed hsbonser closed 6 years ago

hsbonser commented 6 years ago

This shows up when trying to verify the example program.

Arduino: 1.6.8 (Windows 10), Board: "Arduino/Genuino Uno"

In file included from C:\Users\Hsb\Documents\Arduino\NEO_GPS\NEO_GPS.ino:11:0:
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:18:3: error: expected unqualified-id before 'protected'
   protected:
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:34:18: error: 'msg_table_t' does not name a type

     static const msg_table_t  nmea_msg_table __PROGMEM;
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:36:27: error: 'msg_table_t' does not name a type

     NMEAGPS_VIRTUAL const msg_table_t *msg_table() const
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:57:3: error: expected unqualified-id before 'public'

   public:
In file included from C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPS.h:29:0,

                 from C:\Users\Hsb\Documents\Arduino\NEO_GPS\NEO_GPS.ino:10:

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPS_cfg.h:98:38: error: cannot convert 'NMEAGPS::merging_t' to 'const merging_t' in initialization

     #define NMEAGPS_MERGING NMEAGPS::EXPLICIT_MERGING

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:74:17: note: in expansion of macro 'NMEAGPS_MERGING'

       merging = NMEAGPS_MERGING; // see NMEAGPS_cfg.h
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPS_cfg.h:149:45: error: cannot convert 'NMEAGPS::processing_style_t' to 'const processing_style_t' in initialization

   #define NMEAGPS_PROCESSING_STYLE NMEAGPS::PS_POLLING
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:78:26: note: in expansion of macro 'NMEAGPS_PROCESSING_STYLE'

       processing_style = NMEAGPS_PROCESSING_STYLE;  // see NMEAGPS_cfg.h

In file included from C:\Users\Hsb\Documents\Arduino\NEO_GPS\NEO_GPS.ino:11:0:

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:89:17: error: non-member function 'void lock()' cannot have cv-qualifier

     void lock() const
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:95:19: error: non-member function 'void unlock()' cannot have cv-qualifier

     void unlock() const

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:101:3: error: expected unqualified-id before 'protected'

   protected:
In file included from C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/DMS.h:21:0,

                 from C:\Users\Hsb\Documents\Arduino\NEO_GPS\NEO_GPS.ino:2:

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NeoGPS_cfg.h:52:47: error: abstract declarator '<anonymous struct>' used as declaration

   #define NEOGPS_PACKED __attribute__((packed))
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:126:7: note: in expansion of macro 'NEOGPS_PACKED'

     } NEOGPS_PACKED;
In file included from C:\Users\Hsb\Documents\Arduino\NEO_GPS\NEO_GPS.ino:11:0:

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h: In function 'bool comma_needed()':

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:139:16: error: '_comma_needed' was not declared in this scope

         return _comma_needed;

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h: In function 'void comma_needed(bool)':

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:148:9: error: '_comma_needed' was not declared in this scope

         _comma_needed = value;
In file included from C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/DMS.h:21:0,

                 from C:\Users\Hsb\Documents\Arduino\NEO_GPS\NEO_GPS.ino:2:

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h: At global scope:

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NeoGPS_cfg.h:48:24: error: expected initializer before ':' token

   #define NEOGPS_BF(b) :b
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:162:23: note: in expansion of macro 'NEOGPS_BF'

     rxState_t rxState NEOGPS_BF(8);
In file included from C:\Users\Hsb\Documents\Arduino\NEO_GPS\NEO_GPS.ino:11:0:

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:166:32: error: non-member function 'uint8_t _available()' cannot have cv-qualifier

     uint8_t _available() const volatile { return _fixesAvailable; };

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h: In function 'uint8_t _available()':

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:166:50: error: '_fixesAvailable' was not declared in this scope

     uint8_t _available() const volatile { return _fixesAvailable; };
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h: At global scope:

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:182:29: error: non-member function 'bool intervalComplete()' cannot have cv-qualifier

     bool intervalComplete() const { return _intervalComplete; }
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h: In function 'bool intervalComplete()':

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:182:44: error: '_intervalComplete' was not declared in this scope

     bool intervalComplete() const { return _intervalComplete; }
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h: In function 'void intervalComplete(bool)':

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:183:41: error: '_intervalComplete' was not declared in this scope

     void intervalComplete( bool val ) { _intervalComplete = val; }
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h: At global scope:

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:191:46: error: non-member function 'bool intervalCompleted()' cannot have cv-qualifier

     NMEAGPS_VIRTUAL bool intervalCompleted() const
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h: In function 'bool intervalCompleted()':

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:192:17: error: 'nmeaMessage' was not declared in this scope

       { return (nmeaMessage == LAST_SENTENCE_IN_INTERVAL); }
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h: At global scope:

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:210:5: error: 'decode_t' does not name a type

     decode_t parseCommand( char c );
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:211:5: error: 'decode_t' does not name a type
     decode_t parseCommand( const msg_table_t *msgs, uint8_t cmdCount, char c );

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h: In function 'bool parseInt(uint8_t&, uint8_t)':

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:290:7: error: 'negative' was not declared in this scope

       negative = false;
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:299:27: error: 'sentenceInvalid' was not declared in this scope

           sentenceInvalid();
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:306:27: error: 'sentenceInvalid' was not declared in this scope

           sentenceInvalid();
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h: In function 'bool parseInt(int8_t&, uint8_t)':

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:325:9: error: 'negative' was not declared in this scope

         negative = (chr == '-');
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:330:27: error: 'sentenceInvalid' was not declared in this scope

           sentenceInvalid();
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:337:18: error: 'negative' was not declared in this scope

       } else if (negative) {
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h: In function 'bool parseInt(uint16_t&, uint8_t)':

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:350:7: error: 'negative' was not declared in this scope

       negative = false;
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:359:27: error: 'sentenceInvalid' was not declared in this scope

           sentenceInvalid();
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:366:27: error: 'sentenceInvalid' was not declared in this scope

           sentenceInvalid();
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h: In function 'bool parseInt(uint32_t&, uint8_t)':

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:379:7: error: 'negative' was not declared in this scope

       negative = false;
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:388:27: error: 'sentenceInvalid' was not declared in this scope

           sentenceInvalid();

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:395:27: error: 'sentenceInvalid' was not declared in this scope

           sentenceInvalid();
C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h: At global scope:

C:\Users\Hsb\Documents\Arduino\libraries\NeoGPS\src/NMEAGPSprivate.h:402:3: error: expected unqualified-id before 'private'

   private:
exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
SlashDevin commented 6 years ago

Please post your sketch, NEO_GPS.ino.

To make it appear in a gray "code block", put 3 grave accent characters on one line before and after your code, like this:

```

include

// The NEO_GPS.ino sketch // goes here ```

so it looks like this:

#include <NMEAGPS.h>
// The NEO_GPS.ino sketch
//    goes here

It looks like you are trying to include NMEAGPSprivate.h in your sketch. Don't do that. The example programs all show that you should just include NMEAGPS.h.

hsbonser commented 6 years ago

Thanks I see I grabbed the wrong example.