Keep getting "error: expected unqualified-id before '.' token"

I keep getting the error: expected unqualified-id before '.' token for all of my Serial.print lines contained in a library I am making.
For some reason if I change the lines to say Serial1.print the errors go away.

Could someone please point out what I am obviously missing?

Library:

//***********LIBRARIES***************************
#include <SIM900.h> //include the declaration for this class
#include <gsmbase.h>

#include <Stdio.h>
#include <SD.h>
#include <MASTER.h>
#include <EEPROM.h>
#include <Ethernet.h>
#include <SPI.h>
#include <NewSoftSerial.h>
#include <WProgram.h>
#include <ArdOSC.h>
#include <stdlib.h>



//************DEFINES****************************
byte timeStamp[50];


//**************VARIABLES************************
const byte LED_PIN = 13; //use the LED @ Arduino pin 13, this should not change so make it const (constant)
char SSfile[]={"S00DATA.csv"};
File datatext;
char fileT[]={"csv"};//FILE TYPE
static const char cb64[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

//<<constructor>> setup the LED, make pin 13 an OUTPUT
SIM900::SIM900(Serial& telit, uint32_t(*millis)(), Serial* debug):
GSMbase(telit, millis, debug), getData(NULL){
	memset(ipAddress1,'\0',IPsize); //Sets ipAddress1 to all Null(\0) characters
	memset(ipAddress2,'\0',IPsize);
}


//<<destructor>>
SIM900::~SIM900(){/*nothing to destruct*/}

//Turns the SIM900 on/off (requires special hardware configuration that uses a digital input to switch an NPN transistor that allows powerKey to ground)
//Need to add more functionality to test if the shield is already on by sending an AT command
void SIM900::powerKey(int powerPin){
    pinMode(powerPin, OUTPUT);        //Makes the desired digital I/O an output that controls the NPN transistor base.
    digitalWrite(powerPin,HIGH);      //Makes the digital control output +5VDC allowing flow through the NPN transistor.
    delay(2000);                      //It is assumed that a delay() is okay here as it is expected that this function would reside in the SETUP
    digitalWrite(powerPin,LOW);       //Pull the digital pin back down to 0V, turning off the NPN transistor and stoping the current flow between PowerKey and Ground.
}

//Sends an SMS message to a recipitant
void SIM900::sendSms(String phoneNumber, String message){
  Serial2.print("AT+CMGS=");          //SIM900 AT command to send an SMS message 
  Serial2.print(34,BYTE);             //prints quatation marks "
  Serial2.print(phoneNumber);         //ptints the phone number of the recipitant
  Serial2.print(34,BYTE);             //prints quatation marks "
  Serial2.println(13,BYTE);           //prints <CR> also know as cariage reutrn
  delay(3000);                         //wait 3 seconds for a response from the SIM900                     **(THIS SHOULD CHANGE TO USE ANOTHER TIMER NOT DELAY)**  
  Serial2.print(message);             //prints the desired message 
  Serial2.println(26,BYTE);           //prints CTRL-Z also known as sub (Used to let the SIM900 know your SMS is ready to send) **(See SIM900 command manual for details)**
}

const char* const  SIM900::shutIpConnection(){
  Serial2.print("AT+CIPSHUT");        //SIM900 AT command to shut IP connection
  Serial2.print(13,BYTE);             //Prints <CR> to finish command
  //return catchTelitData(2000,1);
}

const char* const  SIM900::getTimeStamp(){
  Serial2.print("AT+CCLK?");      //SIM900 AT command to get time stamp
  Serial2.print(13,BYTE);
    delay(2000);
  if (Serial2.available()>0){ 
    int i = 0;
            while (Serial2.available()>0){              
               // if(i < 20 || i >39){
                 // Serial2.read();  
               // }else {
                  // Serial.print(Serial2.peek());
                  timeStamp[i]=(Serial2.read());
                 // Serial.print(i);
               // }
               i++;               
            }
       
        }
   int years = (((timeStamp[25])-48)*10)+((timeStamp[26])-48);
   int months = (((timeStamp[22])-48)*10)+((timeStamp[23])-48);
   int days  = (((timeStamp[19])-48)*10)+((timeStamp[20])-48);
   int hours = (((timeStamp[28])-48)*10)+((timeStamp[29])-48);
   int mins = (((timeStamp[31])-48)*10)+((timeStamp[32])-48);
   int secs = (((timeStamp[34])-48)*10)+((timeStamp[35])-48);
      
   Serial.print("Time is: ");
   if(days<10){
   Serial.print(0);
   }
   Serial.print(days);
   Serial.print("/");
   if(months<10){
   Serial.print(0);
   }
   Serial.print(months);
   Serial.print("/");
   if (years<10){
   Serial.print(0);
   }
   Serial.print(years);
   Serial.print("-");
   
   if (hours<10){
   Serial.print(0);
   }
   Serial.print(hours);
   Serial.print(":");
    if (mins<10){
   Serial.print(0);
   }
   Serial.print(mins);
   Serial.print(":");
    if (secs<10){
   Serial.print(0);
   }
   Serial.println(secs);   
   delay(5000);
}

Arduino Code:

#include <gsmbase.h>
#include <SIM900.h>
#include <Stdio.h>
#include <SD.h>
#include <MASTER.h>
#include <EEPROM.h>
#include <Ethernet.h>
#include <SPI.h>
#include <NewSoftSerial.h>
#include <WProgram.h>
#include <ArdOSC.h>
#include <stdlib.h>

//SIM900 SIM;
SIM900  mySIM900(Serial2,millis,&Serial); 
byte timeStamp[50];

void setup() {
  Serial2.begin(9600);
  Serial.begin(9600);
  mySIM900.shutIpConnection();
  delay(5000);
  Serial.println("Setup complete");

}

void loop() {
  Serial2.flush();
  mySIM900.getTimeStamp();
  delay(2000);
 /* if (Serial2.available()>0){ 
    int i = 0;
            while (Serial2.available()>0){              
               // if(i < 20 || i >39){
                 // Serial2.read();  
               // }else {
                   Serial.write(Serial2.peek());
                  timeStamp[i]=(Serial2.read());
                 // Serial.print(i);
               // }
               i++;               
            }
       
        }
   int hours = (((timeStamp[28])-48)*10)+((timeStamp[29])-48);
   int mins = (((timeStamp[31])-48)*10)+((timeStamp[32])-48);
   int secs = (((timeStamp[34])-48)*10)+((timeStamp[35])-48);   
   if (hours<10){
   Serial.print(0);
   }
   Serial.print(hours);
   Serial.print(":");
    if (mins<10){
   Serial.print(0);
   }
   Serial.print(mins);
   Serial.print(":");
    if (secs<10){
   Serial.print(0);
   }
   Serial.print(secs);   
   delay(5000);*/
}

It may help if you would post the entire error displayed with that message.

Sorry. That would help. But I should explain that the lines in these errors will not match up with the library code I posted... I had to remove some functions in order to make the post small enough. If that's a problem I can repost it as an attachment maybe.
However SIM900.cpp:257: refers to this line:

Serial.print("Time is: ");

in the getTimeStamp function...

C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp: In member function 'int SIM900::getTimeStamp()':
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:257: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:259: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:261: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:262: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:264: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:266: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:267: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:269: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:271: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:272: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:275: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:277: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:278: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:280: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:282: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:283: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:285: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:287: error: expected unqualified-id before '.' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:288: error: expected primary-expression before '/' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:289: error: expected primary-expression before '}' token
C:\Documents and Settings\users\My Documents\Arduino\libraries\SIM900\SIM900.cpp:289: error: expected `;' before '}' token

Do all the other lines in that file that display that message refer to "Serial."?

Yes they do. The weird part is that I created and tested the function in my sketch first. Once I had that working I wanted to move it to a library and that when I started getting errors. As an alternative I could just calculate a UNIX time stamp from the date/time and return that back to my main sketch.

It appears it is not getting this include. You may want to add this include to your library. I would try putting it in SIM900.h if that file exists.

#include <HardwareSerial.h>

The compiler treats libraries and sketches a little different.

You have #include <WProgram.h>. If you're using arduino 1.0 that should be #include <Arduino.h>