Chrome/Chromium project has a good “base” library that we can use in our products. It’s a good library to include in our product and use it. Yes we can include it in our product and use it.
Here are the steps to compile chromium “base” library and write a simple program using it.
Compile base.lib , base_static.lib:
1. Copy the following directories from the Chrome/chromium source code:
2. Open the base\base.sln file.
3. Compile the “base” project.
Sample source code:
using namespace std;
const wchar_t procname= L”calc.exe”;
int wmain ()
const auto count = base::GetProcessCount(procname,nullptr);
cout << count;
How to compile this code:
cl /D “_UNICODE” /D “UNICODE” -I. program.cc /link /LIBPATH:build\Release\lib psapi.lib base.lib Advapi32.lib Dbghelp.lib Shell32.lib User32.lib base.lib