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:
base
build
testing
third_parth\icu
third_parth\modp_b64
2. Open the base\base.sln file.
3. Compile the “base” project.
Sample source code:
#include <iostream>
#include <base/process_util.h>using namespace std;
const wchar_t procname[]= L”calc.exe”;
int wmain ()
{
const auto count = base::GetProcessCount(procname,nullptr);
cout << count;
return 1;
}
How to compile this code:
cl /D “_UNICODE” /D “UNICODE” -I. program.cc /link /LIBPATH:build\Release\lib psapi.lib base.lib Advapi32.libDbghelp.lib Shell32.lib User32.lib base.lib
转载自:http://hiddencodes.wordpress.com/2012/07/27/can-we-use-chromechromium-base-library-in-our-products/