Problem on code for gps

Hello everyone I decided today to play with my em406 gps module .

Though the code I wrote for my arduino stucks on the compiling stage and dont know why .

Here the code : 

 

#include <NewSoftSerial.h>

#include <nmea.h>

 

NewSoftSerial mygps(4,3);

NMEA gps (GPRMC);

 

void setup() {

  mygps.begin(4800);

  Serial.begin(4800);

  pinMode(3,OUTPUT);

}

 

void loop() {

  mygps.listen();

  if(Serial.available() > 0 && mygps.available() > 0) {

    char c = mygps.read();

    if (gps.decode(c)){

      if (gps.gprmc_status() == 'A') {

        Serial.write("Speed in KMPH:");

        Serial.write(gps.gprmc_speed(KMPH));

        Serial.write("\t Time :");

        Serial.write(gps.gprmc_utc());

        Serial.write("\t Latitude :");

        Serial.write(gps.gprmc_latitude());

        Serial.write("\t Longitude :");

        Serial.write(gps.gprmc_longitude());

      }

    }

  }

}

And here is the error I get :

In file included from sketch_jun26a.cpp:1:

C:\Users\Xenofon\Desktop\arduino-1.0.1\libraries\NewSoftSerial/NewSoftSerial.h:99: error: conflicting return type specified for 'virtual void NewSoftSerial::write(uint8_t)'

C:\Users\Xenofon\Desktop\arduino-1.0.1\hardware\arduino\cores\arduino/Print.h:48: error:   overriding 'virtual size_t Print::write(uint8_t)'

 

If anyone can help me I would be glad .

Thanks anyway... 

 

Looks like you’re trying to

Looks like you’re trying to write TO the gps what you want to be the Serial output. Use print and println to data appears in serial monitor.

Have a look also to the prototype of write function in NewSoftSerial, you seems not using it right (the conflit is on return type).