Do the following steps To create a static library project:
- On the menu bar, choose File, New, Project.
- In the left pane of the New Project dialog box, expand Installed,
Templates, Visual C++, and then select Win32.
- In the center pane, select Win32 Console Application.
- Specify a name for the project—for example, MathFuncsLib—in the Name
box. Specify a name for the solution—for example, StaticLibrary—in
the Solution Name box. Choose the OK button.
- On the Overview page of the Win32 Application Wizard dialog box,
choose the Next button.
- On the Application Settings page, under Application type, select
Static library.
- On the Application Settings page, under Additional options, clear
the Precompiled header check box.
- Choose the Finish button to create the project.
To create a C++ console app that references the static library
- On the menu bar, choose File, New, Project.
- In the left pane, under Visual C++, select Win32.
- In the center pane, select Win32 Console Application.
- Specify a name for the project—for example, MyExecRefsLib—in the
Name box. In the drop-down list next to Solution, select Add to
Solution. This adds the new project to the solution that contains
the static library. Choose the OK button.
- On the Overview page of the Win32 Application Wizard dialog box,
choose the Next button.
- On the Application Settings page, under Application type, select
Console application.
- On the Application Settings page, under Additional options, clear
the Precompiled header check box.
- Choose the Finish button to create the project.
Source: https://msdn.microsoft.com/en-us/library/ms235627.aspx
You can see additional info in the link above, how to use the code in your project.
Update following question in comment:
Right click on your project in the solution explorer and then click on Properties.
Next open Configuration Properties and then Linker.
Now you want to add the folder you have the Allegro libraries in to Additional Library Directories,
Linker -> Input you'll add the actual library files under Additional Dependencies.
For the Header Files you'll also want to include their directories under C/C++ -> Additional Include Directories.
Have a copy of your lib file in your main project folder, and done
I hope it supports your question.