user1499: I have this code:
#include <TinyGPS++.h>
#include <SoftwareSerial.h>

#include <Wire.h>
#include <Adafruit_MCP23017.h>
#include <Adafruit_RGBLCDShield.h>

#include <GSM.h>

#define PINNUMBER ""  // Opt from user
#define GPS_RX_PIN 2
#define GPS_TX_PIN 3
#define WHITE 0x7  //For LCD library

//Objects initialization
GSM gsmAccess;
GSM_SMS sms;

Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();

TinyGPSPlus gps;
SoftwareSerial ss(GPS_RX_PIN, GPS_TX_PIN);

// Chars and strings for gps values
char clat[10 + 20 + 1] = "Latitude/Longitude: ";
char clng[10 + 1];
String string1, string2, finalstr;


const int xpin = A0;                  // X-axis of the accelerometer
const int ypin = A1;                  // Y-axis
const int zpin = A2;                  // Z-axis (only on 3-axis models)

float convX = 0.0, convY = 0.0, convZ = 0.0;
int sampleDelay = 20;

char remoteNumber[20] = "306978666866"; // Opt from user

uint8_t i = 0;

void setup()
{
  Serial.begin(9600); //GSM
  ss.begin(4800);     //gps

  analogReference(EXTERNAL); // For external analog reference of ADXL335
  pinMode(xpin, INPUT);
  pinMode(ypin, INPUT);
  pinMode(zpin, INPUT);

  // Set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  lcd.setBacklight(WHITE);
  lcd.setCursor(0, 0);

  // GSM connection state
  boolean notConnected = true;

  while(notConnected)
  {
    if(gsmAccess.begin(PINNUMBER) == GSM_READY)
      notConnected = false;
    else
    {
      lcd.print("Not connected");
      delay(1000);
    }
  }
  lcd.print("GSM initialized");

  delay(2000);
  lcd.print("SELECT=Emergency");
}

void loop()
{
  bool uniFlag = false;
  int x = analogRead(xpin);
  delay(1); // Add a small delay between pin readings. I read that you should
            // do this but haven't tested the importance.

  int y = analogRead(ypin);
  delay(1);

  int z = analogRead(zpin);

  // zero_G is the reading we expect from the sensor when it detects
  // no acceleration. Subtract this value from the sensor reading to
  // get a shifted sensor reading.
  float zero_G = 502.0;

  // 'scale' is the number of units we expect the sensor reading to
  // change when the acceleration along an axis changes by 1G.
  // Divide the shifted sensor reading by scale to get acceleration in Gs.
  //   610 (1g) - 502 (0g) = 108
  float scale = 108;

  //value (g) = (measurement - 502)/ 108
  convX = ((float)x - zero_G)/scale;
  convY = ((float)y - zero_G)/scale;
  convZ = ((float)z - zero_G)/scale;

  delay(sampleDelay);

  if (convX > 2 || convX < -2 || convY > 2 || convY < -2)
    uniFlag = true;

  uint8_t buttons = lcd.readButtons();

  if (buttons) {
    if (buttons & BUTTON_SELECT) {
      uniFlag = true;}
  }

  if (uniFlag == true)
  {
    bool isGpsLocationValid = false;
    do
    {
      while (ss.available()>0)
      {
        char c = byte(ss.read());
        if (gps.encode(c))
        {
          if (gps.location.isValid())
          {
            dtostrf(gps.location.lat(), 10, 6, clat+20);
            dtostrf(gps.location.lng(), 10, 6, clng);
            isGpsLocationValid = true;
            string1 = String(clat);
            string2 = String(clng);
            finalstr = string1 + string2;
          }
        }
      }
    } while (isGpsLocationValid == false);
  }
  sendSMS(finalstr);
}

void sendSMS(String thisString)
{
  sms.beginSMS(remoteNumber);
  sms.print(thisString);
  sms.endSMS();
  lcd.setCursor(0, 0);
  lcd.print("Message sent!");
  delay(10000); //for multiple bumps
}

When I try to compile it I get these errors:
GSM\GSM3SoftSerial.cpp.o: In function `__vector_5':
C:\Program Files (x86)\Arduino\libraries\GSM/GSM3SoftSerial.cpp:525: multiple definition of `__vector_5'
SoftwareSerial\SoftwareSerial.cpp.o:C:\Program Files (x86)\Arduino\libraries\SoftwareSerial/SoftwareSerial.cpp:319: first defined here
GSM\GSM3SoftSerial.cpp.o: In function `__vector_4':
C:\Program Files (x86)\Arduino\libraries\GSM/GSM3SoftSerial.cpp:518: multiple definition of `__vector_4'
SoftwareSerial\SoftwareSerial.cpp.o:C:\Program Files (x86)\Arduino\libraries\SoftwareSerial/SoftwareSerial.cpp:312: first defined here
GSM\GSM3SoftSerial.cpp.o: In function `__vector_3':
C:\Program Files (x86)\Arduino\libraries\GSM/GSM3SoftSerial.cpp:511: multiple definition of `__vector_3'
SoftwareSerial\SoftwareSerial.cpp.o:C:\Program Files (x86)\Arduino\libraries\SoftwareSerial/SoftwareSerial.cpp:305: first defined here

What is going on? Is it that GSM.h declares SoftwareSerial inside? Are there any solutions?
This is the first time I get these kinds of compilation errors and have no idea what is going on or how to fix it.

user1585: I have not downloaded the libraries in question, but It would appear that there is a collision between "SoftSerial.h" and the "GSM/GSM3SoftSerial.h" built in to your GSM library. 
There is a disscussion of this conflict here:
https://github.com/mainehackerclub/open_vehicle_tracker/issues/28
It seems the answer is to use the "AltSoftSerial" library instead of the stock "SoftSerial" library. The "AltSoftSerial" library can be downloaded here
http://www.pjrc.com/teensy/td_libs_AltSoftSerial.html

user83: Both SoftwareSerial and GSM are trying to declare the same interrupt vectors. You'll have to drop one of the libraries, find a replacement or change your code to omit one of the libraries. This is the disadvantage of using high level libraries.
Some Arduino's (Arduino Mega) have a microcontroller that supports more than one hardware serial channel, you may want to check that in the datasheet of the ATmega that is on the board.

1499: <p>I have this code:</p>

<pre><code>#include &lt;TinyGPS++.h&gt;
#include &lt;SoftwareSerial.h&gt;

#include &lt;Wire.h&gt;
#include &lt;Adafruit_MCP23017.h&gt;
#include &lt;Adafruit_RGBLCDShield.h&gt;

#include &lt;GSM.h&gt;

#define PINNUMBER ""  // Opt from user
#define GPS_RX_PIN 2
#define GPS_TX_PIN 3
#define WHITE 0x7  //For LCD library

//Objects initialization
GSM gsmAccess;
GSM_SMS sms;

Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();

TinyGPSPlus gps;
SoftwareSerial ss(GPS_RX_PIN, GPS_TX_PIN);

// Chars and strings for gps values
char clat[10 + 20 + 1] = "Latitude/Longitude: ";
char clng[10 + 1];
String string1, string2, finalstr;


const int xpin = A0;                  // X-axis of the accelerometer
const int ypin = A1;                  // Y-axis
const int zpin = A2;                  // Z-axis (only on 3-axis models)

float convX = 0.0, convY = 0.0, convZ = 0.0;
int sampleDelay = 20;

char remoteNumber[20] = "306978666866"; // Opt from user

uint8_t i = 0;

void setup()
{
  Serial.begin(9600); //GSM
  ss.begin(4800);     //gps

  analogReference(EXTERNAL); // For external analog reference of ADXL335
  pinMode(xpin, INPUT);
  pinMode(ypin, INPUT);
  pinMode(zpin, INPUT);

  // Set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  lcd.setBacklight(WHITE);
  lcd.setCursor(0, 0);

  // GSM connection state
  boolean notConnected = true;

  while(notConnected)
  {
    if(gsmAccess.begin(PINNUMBER) == GSM_READY)
      notConnected = false;
    else
    {
      lcd.print("Not connected");
      delay(1000);
    }
  }
  lcd.print("GSM initialized");

  delay(2000);
  lcd.print("SELECT=Emergency");
}

void loop()
{
  bool uniFlag = false;
  int x = analogRead(xpin);
  delay(1); // Add a small delay between pin readings. I read that you should
            // do this but haven't tested the importance.

  int y = analogRead(ypin);
  delay(1);

  int z = analogRead(zpin);

  // zero_G is the reading we expect from the sensor when it detects
  // no acceleration. Subtract this value from the sensor reading to
  // get a shifted sensor reading.
  float zero_G = 502.0;

  // 'scale' is the number of units we expect the sensor reading to
  // change when the acceleration along an axis changes by 1G.
  // Divide the shifted sensor reading by scale to get acceleration in Gs.
  //   610 (1g) - 502 (0g) = 108
  float scale = 108;

  //value (g) = (measurement - 502)/ 108
  convX = ((float)x - zero_G)/scale;
  convY = ((float)y - zero_G)/scale;
  convZ = ((float)z - zero_G)/scale;

  delay(sampleDelay);

  if (convX &gt; 2 || convX &lt; -2 || convY &gt; 2 || convY &lt; -2)
    uniFlag = true;

  uint8_t buttons = lcd.readButtons();

  if (buttons) {
    if (buttons &amp; BUTTON_SELECT) {
      uniFlag = true;}
  }

  if (uniFlag == true)
  {
    bool isGpsLocationValid = false;
    do
    {
      while (ss.available()&gt;0)
      {
        char c = byte(ss.read());
        if (gps.encode(c))
        {
          if (gps.location.isValid())
          {
            dtostrf(gps.location.lat(), 10, 6, clat+20);
            dtostrf(gps.location.lng(), 10, 6, clng);
            isGpsLocationValid = true;
            string1 = String(clat);
            string2 = String(clng);
            finalstr = string1 + string2;
          }
        }
      }
    } while (isGpsLocationValid == false);
  }
  sendSMS(finalstr);
}

void sendSMS(String thisString)
{
  sms.beginSMS(remoteNumber);
  sms.print(thisString);
  sms.endSMS();
  lcd.setCursor(0, 0);
  lcd.print("Message sent!");
  delay(10000); //for multiple bumps
}
</code></pre>

<p>When I try to compile it I get these errors:</p>

<pre><code>GSM\GSM3SoftSerial.cpp.o: In function `__vector_5':
C:\Program Files (x86)\Arduino\libraries\GSM/GSM3SoftSerial.cpp:525: multiple definition of `__vector_5'
SoftwareSerial\SoftwareSerial.cpp.o:C:\Program Files (x86)\Arduino\libraries\SoftwareSerial/SoftwareSerial.cpp:319: first defined here
GSM\GSM3SoftSerial.cpp.o: In function `__vector_4':
C:\Program Files (x86)\Arduino\libraries\GSM/GSM3SoftSerial.cpp:518: multiple definition of `__vector_4'
SoftwareSerial\SoftwareSerial.cpp.o:C:\Program Files (x86)\Arduino\libraries\SoftwareSerial/SoftwareSerial.cpp:312: first defined here
GSM\GSM3SoftSerial.cpp.o: In function `__vector_3':
C:\Program Files (x86)\Arduino\libraries\GSM/GSM3SoftSerial.cpp:511: multiple definition of `__vector_3'
SoftwareSerial\SoftwareSerial.cpp.o:C:\Program Files (x86)\Arduino\libraries\SoftwareSerial/SoftwareSerial.cpp:305: first defined here
</code></pre>

<p>What is going on? Is it that GSM.h declares SoftwareSerial inside? Are there any solutions?</p>

<p>This is the first time I get these kinds of compilation errors and have no idea what is going on or how to fix it.</p>
 1585: <p>I have not downloaded the libraries in question, but It would appear that there is a collision between "SoftSerial.h" and the "GSM/GSM3SoftSerial.h" built in to your GSM library. </p>

<p>There is a disscussion of this conflict here:
<a href="https://github.com/mainehackerclub/open_vehicle_tracker/issues/28" rel="nofollow">https://github.com/mainehackerclub/open_vehicle_tracker/issues/28</a></p>

<p>It seems the answer is to use the "AltSoftSerial" library instead of the stock "SoftSerial" library. The "AltSoftSerial" library can be downloaded here
<a href="http://www.pjrc.com/teensy/td_libs_AltSoftSerial.html" rel="nofollow">http://www.pjrc.com/teensy/td_libs_AltSoftSerial.html</a></p>
 83: <p>Both <code>SoftwareSerial</code> and <code>GSM</code> are trying to declare the same interrupt vectors. You'll have to drop one of the libraries, find a replacement or change your code to omit one of the libraries. This is the disadvantage of using high level libraries.</p>

<p>Some Arduino's (Arduino Mega) have a microcontroller that supports more than one hardware serial channel, you may want to check that in the datasheet of the ATmega that is on the board.</p>
