I'm completely new in the universe of CEF and even chromium. I was successfull at compiling libcef using the cef solution on VS2010 after some work on it. But I'm trying to get working a small "empty" projet that would be independant from the huge cef solution that takes loads of time to open using VS2010.
Right now, I have written a very simple code that looks like :
- Code: Select all
RECT r = {0, 0, 1000, 1000};
CefWindowInfo info;
info.SetAsChild(hWnd, r);
CefBrowserSettings settings;
CefBrowser::CreateBrowser(info, 0, L"http://www.google.com", settings);
I'm saving you the boring stuff about the window initialization for the moment, if you feel like you need it, just ask.
I have added libcef.lib in the linker libraries to be able to link with it.
The problem is that when VS2010 links, I get the following error :
- Code: Select all
1>main.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl CefBrowser::CreateBrowser(class CefWindowInfo &,class CefRefPtr<class CefClient>,class CefStringBase<struct CefStringTraitsUTF16> const &,class CefStructBase<struct CefBrowserSettingsTraits> const &)" (?CreateBrowser@CefBrowser@@SA_NAAVCefWindowInfo@@V?$CefRefPtr@VCefClient@@@@ABV?$CefStringBase@UCefStringTraitsUTF16@@@@ABV?$CefStructBase@UCefBrowserSettingsTraits@@@@@Z) referenced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)
I tried to add the libcef_dll_wrapper.lib to the linker but then the error messages just change to become :
- Code: Select all
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Container_base12::~_Container_base12(void)" (??1_Container_base12@std@@QAE@XZ) already defined in libcef_dll_wrapper.lib(v8handler_cpptoc.obj)
[... (put here other errors of the same type on other symbols, same lib involved)]
Then I tried to add "msvcprtd.lib" in the "Ignore Specific Default Libraries" option of the linker to prevent those symbols to be defined at two different places. Problem: the program starts but immediately fails with the following error:
- Code: Select all
Assertion failed!
Program: ...
File: C:\Chromium\src\cef\libcef_dll/cpptoc/cpptoc.h
Line: 70
Expression: cls
Any ideas of what I have done wrong here?
Thanks a lot for your time and help.