arduino error in at the compile time

just starting with arduino and getting a led to blink that works then loading up a library to move on the on to the code i want to play with
all i have done it to include the header file for ledcontrol just to test that its finding the libray but the error below keeps being thrown up.
i have the led blinking ok so i know the boards communicating so thats all working just when i have included
#include "LedControl.h" i have added the header file to the library under this sketch so thats fine

*************************************
vC:\Users\hp\AppData\Local\Temp\cc4kxjTV.ltrans0.ltrans.o: In function `_GLOBAL__sub_I_lc':

cc4kxjTV.ltrans0.o:(.text.startup+0x148): undefined reference to `LedControl::LedControl(int, int, int, int)'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

#include "LedControl.h"
const int led =13;

LedControl lc=LedControl(12,10,11,2);
****************************

void setup() {
  // put your setup code here, to run once:
pinMode(led,OUTPUT);

}

void loop() {
  // put your main code here, to run repeatedly:
digitalWrite(led,HIGH);
delay(1000);
digitalWrite(led,LOW);
delay(1000);
}
sydneyguyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dr. KlahnPrincipal Software EngineerCommented:
Have you installed the LEDControl library into the Arduino IDE?  It is not a library that automatically comes with the IDE.

https://playground.arduino.cc/Main/LedControl

"The sourcecode for the library is on GitHub, the latest binary release is always available from the LedControl Release Page."

Also:  The LEDControl library requires external hardware, either the MAX7221 or MAX7219 chips.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sydneyguyAuthor Commented:
figured it out was only loading up the header file under the sketch but not the cpp file did that and it works fine thanks for the help though
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.