PinChangeInt Libary not working

When I try to compile code that includes the PinChangeInt.h libary I get this message:

In file included from RCI.ino:1:0:
C:\Program Files\Arduino\libraries\PinChangeInt/PinChangeInt.h:301:32: error: 'PCMSK0' was not declared in this scope
PCintPort portB=PCintPort(2, 0,PCMSK0); // port PB==2 (from Arduino.h, Arduino version 1.0)

among other similar errors, does anybody know how to fix it, I spent some time looking online but no one seems to have a solution.

but no one seems to have a solution.

Probably because most of the questions lack detail, like yours. What version of the IDE? Which Arduino? Where did you get the library you are using? Where is your code?

As you can see, you've given us little to go on.

The Arduino IDE Latest Version(1.6.5)
I got the library from the google code website
https://code.google.com/p/arduino-pinchangeint/downloads/list

I am just trying to compile a code example from a website(Reading in PWM Signal)
http://www.benripley.com/diy/arduino/three-ways-to-read-a-pwm-signal-with-arduino/

Here is the code for reference

#include <PinChangeInt.h>
 
#define MY_PIN 5 // we could choose any pin
 
volatile int pwm_value = 0;
volatile int prev_time = 0;
uint8_t latest_interrupted_pin;
 
void rising()
{
  latest_interrupted_pin=PCintPort::arduinoPin;
  PCintPort::attachInterrupt(latest_interrupted_pin, &falling, FALLING);
  prev_time = micros();
}
 
void falling() {
  latest_interrupted_pin=PCintPort::arduinoPin;
  PCintPort::attachInterrupt(latest_interrupted_pin, &rising, RISING);
  pwm_value = micros()-prev_time;
  Serial.println(state);
}
 
void setup() {
  pinMode(MY_PIN, INPUT); digitalWrite(MY_PIN, HIGH);
  Serial.begin(115200);
  PCintPort::attachInterrupt(MY_PIN, &rising, RISING);
}
 
void loop() { }

Where did you place the new library and did you restart the IDE after adding the new library?

The link was a zip that came with 3 folders (PinChangeInt,Memory Free,CppFix) I placed all three folders in the libraries folder in the arduino directory.

And yes I restarted the arduino IDE, the library shows up in the library drop down menu.

So, what happens if you try to compile one of the sample programs that is distributed with the library? I just installed the library and compiled one of the sample programs without issue.

I loaded and compiled your program after adding the global:

bool state = false;

and it compiled fine.

So, if your IDE is installed at: C://Arduino1.6.5, then your library is at:

C://Arduino1.6.5/libraries/PinChangeInt

right?

WHICH ARDUINO?

Here is my path
C:\Program Files\Arduino\libraries\PinChangeInt

I am excited to know that the program is compile-able and it is just my computer's settings, Hopefully I can nip this in the butt quickly.

I am actually programing on top of an ESC, as far as arduino knows it is a Arduino NG or older with an atmega8 16MHz

My ESC Firmware can spin BLDC Motors, and now I want to be able to read PWM Signals

UPDATE: The code compiles fine with Arduino UNO but does not work for Arduino NG or older with an atmega8
Why is this and is there a way to port the code over?

Maybe you should just try GitHub - GreyGnome/EnableInterrupt: New Arduino interrupt library, designed for Arduino Uno/Mega 2560/Leonardo/Due, it's a maintained rewrite of PinChangeInt.

Read the data sheets. Atmega8, 8L, 8A hardware does not support PCINT.
You need Atmega48/88/168/328 family to get PCINTs. Same 28 pin DIP & 32 pin SMD package.

You can grab the latest datasheets here.