Serial Camera Interface

I've read previous posts about the arduino code on capturing images, btw I'm a newbie in arduino codes so I really need your help right here guys

the code goes like this

#include <CameraC328R.h>
#include <NewSoftSerial.h>
#define LED_PIN 13
#define PAGE_SIZE 64
#define USB_BAUD 115200
#define CAMERA_BAUD 14400
NewSoftSerial mySerial(2, 3);
CameraC328R camera(&mySerial);
uint16_t pictureSizeCount = 0;
/**

  • This callback is called EVERY time a JPEG data packet is received.
    /
    void getJPEGPicture_callback( uint16_t pictureSize, uint16_t packageSize,
    uint16_t packageCount, byte
    package )
    {
    // packageSize is the size of the picture part of the package
    pictureSizeCount += packageSize;
    Serial.write(package,packageSize);
    if( pictureSizeCount >= pictureSize )
    {
    digitalWrite( LED_PIN, LOW );
    Serial.flush();
    }
    }
    void setup()
    {
    Serial.begin( USB_BAUD );
    mySerial.begin(CAMERA_BAUD);
    pinMode( LED_PIN, OUTPUT );
    digitalWrite( LED_PIN, LOW );
    }
    void loop()
    {
    if( Serial.available() ){
    while(Serial.read() != -1);
    digitalWrite( LED_PIN, HIGH );
    if( !camera.sync() )
    {

Serial.println( "Sync failed." );
return;
}
if( !camera.initial( CameraC328R::CT_JPEG, CameraC328R::PR_160x120,
CameraC328R::JR_640x480 ) )
{
Serial.println( "Initial failed." );
return;
}
if( !camera.setPackageSize( 64 ) )
{
Serial.println( "Package size failed." );
return;
}
if( !camera.setLightFrequency( CameraC328R::FT_50Hz ) )
{
Serial.println( "Light frequency failed." );
return;
}
if( !camera.snapshot( CameraC328R::ST_COMPRESSED, 0 ) )
{
Serial.println( "Snapshot failed." );
return;
}
pictureSizeCount = 0;
if( !camera.getJPEGPicture( CameraC328R::PT_JPEG, PROCESS_DELAY,
&getJPEGPicture_callback ) )
{
Serial.println( "Get JPEG failed." );
return;
}
}
}

Ive downloaded properly the c328 and newsoftserial library but im still getting these errors :

In file included from sketch_sep22a.cpp:1:
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\CameraC328R/CameraC328R.h:24:22: error: WProgram.h: No such file or directory
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\CameraC328R/CameraC328R.h:25:24: error: WConstants.h: No such file or directory
In file included from sketch_sep22a.cpp:2:
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\NewSoftSerial/NewSoftSerial.h:33:2: error: #error NewSoftSerial has been moved into the Arduino core as of version 1.0. Use SoftwareSerial instead.
In file included from sketch_sep22a.cpp:1:
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\CameraC328R/CameraC328R.h:130: error: 'byte' has not been declared
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\CameraC328R/CameraC328R.h:132: error: 'byte' has not been declared
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\CameraC328R/CameraC328R.h:137: error: 'byte' does not name a type
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\CameraC328R/CameraC328R.h:138: error: 'byte' does not name a type
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\CameraC328R/CameraC328R.h:139: error: 'byte' has not been declared
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\CameraC328R/CameraC328R.h:139: error: 'byte' has not been declared
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\CameraC328R/CameraC328R.h:139: error: 'byte' has not been declared
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\CameraC328R/CameraC328R.h:139: error: 'byte' has not been declared
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\CameraC328R/CameraC328R.h:139: error: ISO C++ forbids declaration of 'byte' with no type
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\CameraC328R/CameraC328R.h:141: error: 'byte' has not been declared
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\CameraC328R/CameraC328R.h:144: error: ISO C++ forbids declaration of 'byte' with no type
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\CameraC328R/CameraC328R.h:145: error: ISO C++ forbids declaration of 'byte' with no type
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\CameraC328R/CameraC328R.h:121: error: 'NULL' was not declared in this scope
In file included from sketch_sep22a.cpp:2:
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\libraries\NewSoftSerial/NewSoftSerial.h:99: error: conflicting return type specified for 'virtual void NewSoftSerial::write(uint8_t)'
C:\Users\msi\Desktop\for Arduino Seminar\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'
sketch_sep22a.cpp: In function 'void loop()':
sketch_sep22a:62: error: invalid conversion from 'void ()(uint16_t, uint16_t, uint16_t, byte)' to 'void ()(uint16_t, uint16_t, uint16_t, int)'
sketch_sep22a:62: error: initializing argument 3 of 'bool CameraC328R::getJPEGPicture(CameraC328R::PictureType, uint16_t, void ()(uint16_t, uint16_t, uint16_t, int))'

can you help me debug this errors? Ive placed the libraries in the libraries folder already