Windows, link with CRT DLL

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Windows, link with CRT DLL

Postby alexeibs » Wed Dec 03, 2014 7:45 am

I tried to follow instructions from https://code.google.com/p/chromiumembed ... eLibraries
but it didn't help me. libcef_dll_wrapper.lib still require static CRT. It looks like VS project settings just don't apply. How can I fix this?
I'm building CEF 2171 with Chromium tag 39.0.2171.65
alexeibs
Techie
 
Posts: 12
Joined: Tue Dec 02, 2014 4:07 pm

Re: Windows, link with CRT DLL

Postby alexeibs » Mon Dec 08, 2014 9:50 am

As I understood instructions from CEF wiki are relevant to the CEF binary distributions only. But I'm building CEF from sources so that's not working for me. I solved the problem by manual editing of the gyp project file. First I run 'ninja -C out\Debug cefclient cef_unittests'. Then I manually edited libcef_dll_wrapper.ninja and replaced /MTd flag with /MDd flag. Then I launched 'ninja -C out\Debug libcef_dll_wrapper'. It worked.
Then I added new configuration 'libcef_dll_wrapper_md' into cef.gyp:
Code: Select all
    {
      'target_name': 'libcef_dll_wrapper_md',
      'type': 'static_library',
      'msvs_guid': '3DD56D0D-425F-40EE-8704-751D94737AE8',
      'defines': [
        'USING_CEF_SHARED',
      ],
      'include_dirs': [
        '.',
      ],
      'sources': [
        '<@(includes_common)',
        '<@(includes_capi)',
        '<@(includes_wrapper)',
        '<@(libcef_dll_wrapper_sources_common)',
      ],
      'dependencies': [
        'libcef',
      ],
      'configurations': {
        'Debug_Base': {
          'msvs_settings': {
            'VCCLCompilerTool': {
              'RuntimeLibrary': '3' # MultiThreadedDebugDLL
            },
          },
        },
        'Release_Base': {
          'msvs_settings': {
            'VCCLCompilerTool': {
              'RuntimeLibrary': '2' # MultiThreadedDLL
            },
          },
        },
      },
    },

This allows me to build all targets by singe command 'ninja -C out\Debug cefclient cef_unittests libcef_dll_wrapper_md' without manual editing of .ninja file
alexeibs
Techie
 
Posts: 12
Joined: Tue Dec 02, 2014 4:07 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot], TakashiHSD and 41 guests