![]() ![]() Then you add the generated LIB file to your final project and include external projects in your final binary. Just adding another project is not enough, you need to compile them and generate LIB files out of them. ![]() ![]() This way, your code will work and run properly in other computers. So when you compile all static codes will be included in your EXE file, but DLL files will be loaded and used dynamically in runtime, so you just need to have your DLL files with your EXE file. You don't need to have LIB files along with your EXE file for running in another computer, LIB files are static files and DLL files are dynamic. C++, Visual Studio 2012, LIBs, DLLs, Includes, Source and Linker dll file is in the current directory where you run the exe or make sure the path of the. lib file here.ģ) Now when you run the exe make sure that your. lib ) fileĢ) Project Properties -> Linker -> Input -> Additional Dependencies -> Place the name of your. > in the directory you'll be opening your final executable from or into Windows/system32 How to install C++ library to VS2012?ġ) Go to Project Properties -> Linker -> General -> Additional Library Directories -> Place here the path of your library (. > Configuration Properties/Linker/Input/Additional Dependencies (e.g.: library.lib > project(on top bar)/properties/Configuration Properties/VC++ Directories/Library Directories (click and edit, add a new entry) > Configuration Properties/VC++ Directories/Include Directories (click and edit, add a new entry)ģ) Add a library directory for *.lib files: Typically you need to do 5 things to include a library in your project:ġ) Add #include statements necessary files with declarations/interfaces, e.g.: #include "library.h"Ģ) Add an include directory for the compiler to look into How to include libraries in Visual Studio 2012? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |