cef conflict

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.

cef conflict

Postby CaiHuan » Sun Jan 25, 2015 10:55 am

if i import base/memory/recout.h
using scoped_refptr class like scoped_refptr<MainHtmlHandler> temp = new (std::nothrow)MainHtmlHandler();

the compiler post this error message
d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(30): error C2084: function 'base::subtle::Atomic32 base::subtle::NoBarrier_CompareAndSwap(volatile base::subtle::Atomic32 *,base::subtle::Atomic32,base::subtle::Atomic32)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomicops.h(113) : see previous definition of 'NoBarrier_CompareAndSwap'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(39): error C2084: function 'base::subtle::Atomic32 base::subtle::NoBarrier_AtomicExchange(volatile base::subtle::Atomic32 *,base::subtle::Atomic32)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomicops.h(119) : see previous definition of 'NoBarrier_AtomicExchange'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(47): error C2084: function 'base::subtle::Atomic32 base::subtle::Barrier_AtomicIncrement(volatile base::subtle::Atomic32 *,base::subtle::Atomic32)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomicops.h(125) : see previous definition of 'Barrier_AtomicIncrement'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(54): error C2084: function 'base::subtle::Atomic32 base::subtle::NoBarrier_AtomicIncrement(volatile base::subtle::Atomic32 *,base::subtle::Atomic32)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomicops.h(123) : see previous definition of 'NoBarrier_AtomicIncrement'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(55): error C3861: 'Barrier_AtomicIncrement': identifier not found
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(61): error C2084: function 'void base::subtle::MemoryBarrier(void)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomicops.h(144) : see previous definition of 'MemoryBarrier'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(73): error C2084: function 'base::subtle::Atomic32 base::subtle::Acquire_CompareAndSwap(volatile base::subtle::Atomic32 *,base::subtle::Atomic32,base::subtle::Atomic32)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomicops.h(137) : see previous definition of 'Acquire_CompareAndSwap'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(74): error C3861: 'NoBarrier_CompareAndSwap': identifier not found
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(79): error C2084: function 'base::subtle::Atomic32 base::subtle::Release_CompareAndSwap(volatile base::subtle::Atomic32 *,base::subtle::Atomic32,base::subtle::Atomic32)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomicops.h(140) : see previous definition of 'Release_CompareAndSwap'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(80): error C3861: 'NoBarrier_CompareAndSwap': identifier not found
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(83): error C2084: function 'void base::subtle::NoBarrier_Store(volatile base::subtle::Atomic32 *,base::subtle::Atomic32)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomicops.h(145) : see previous definition of 'NoBarrier_Store'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(87): error C2084: function 'void base::subtle::Acquire_Store(volatile base::subtle::Atomic32 *,base::subtle::Atomic32)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomicops.h(146) : see previous definition of 'Acquire_Store'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(88): error C3861: 'NoBarrier_AtomicExchange': identifier not found
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(92): error C2084: function 'void base::subtle::Release_Store(volatile base::subtle::Atomic32 *,base::subtle::Atomic32)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomicops.h(147) : see previous definition of 'Release_Store'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(97): error C2084: function 'base::subtle::Atomic32 base::subtle::NoBarrier_Load(volatile const base::subtle::Atomic32 *)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomicops.h(149) : see previous definition of 'NoBarrier_Load'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(101): error C2084: function 'base::subtle::Atomic32 base::subtle::Acquire_Load(volatile const base::subtle::Atomic32 *)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomicops.h(150) : see previous definition of 'Acquire_Load'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(106): error C2084: function 'base::subtle::Atomic32 base::subtle::Release_Load(volatile const base::subtle::Atomic32 *)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomicops.h(151) : see previous definition of 'Release_Load'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomicops_internals_x86_msvc.h(107): error C3861: 'MemoryBarrier': identifier not found
1>d:\workspace\cef_project\third_party\chromium\src\base\atomic_ref_count.h(22): error C2084: function 'void base::AtomicRefCountIncN(volatile base::AtomicRefCount *,base::AtomicRefCount)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomic_ref_count.h(66) : see previous definition of 'AtomicRefCountIncN'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomic_ref_count.h(31): error C2084: function 'bool base::AtomicRefCountDecN(volatile base::AtomicRefCount *,base::AtomicRefCount)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomic_ref_count.h(75) : see previous definition of 'AtomicRefCountDecN'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomic_ref_count.h(37): error C2084: function 'void base::AtomicRefCountInc(volatile base::AtomicRefCount *)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomic_ref_count.h(86) : see previous definition of 'AtomicRefCountInc'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomic_ref_count.h(44): error C2084: function 'bool base::AtomicRefCountDec(volatile base::AtomicRefCount *)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomic_ref_count.h(93) : see previous definition of 'AtomicRefCountDec'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomic_ref_count.h(54): error C2084: function 'bool base::AtomicRefCountIsOne(volatile base::AtomicRefCount *)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomic_ref_count.h(103) : see previous definition of 'AtomicRefCountIsOne'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomic_ref_count.h(55): error C2446: '==' : no conversion from 'int' to 'base::subtle::Atomic32 (__cdecl *)(volatile const base::subtle::Atomic32 *)'
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>d:\workspace\cef_project\third_party\chromium\src\base\atomic_ref_count.h(55): error C2040: '==' : 'base::subtle::Atomic32 (__cdecl *)(volatile const base::subtle::Atomic32 *)' differs in levels of indirection from 'int'
1>d:\workspace\cef_project\third_party\chromium\src\base\atomic_ref_count.h(62): error C2084: function 'bool base::AtomicRefCountIsZero(volatile base::AtomicRefCount *)' already has a body
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_atomic_ref_count.h(114) : see previous definition of 'AtomicRefCountIsZero'
1>d:\workspace\cef_project\third_party\chromium\src\base\logging.h(304): warning C4005: 'COMPACT_GOOGLE_LOG_EX_INFO' : macro redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_logging.h(198) : see previous definition of 'COMPACT_GOOGLE_LOG_EX_INFO'
1>d:\workspace\cef_project\third_party\chromium\src\base\logging.h(306): warning C4005: 'COMPACT_GOOGLE_LOG_EX_WARNING' : macro redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_logging.h(201) : see previous definition of 'COMPACT_GOOGLE_LOG_EX_WARNING'
1>d:\workspace\cef_project\third_party\chromium\src\base\logging.h(308): warning C4005: 'COMPACT_GOOGLE_LOG_EX_ERROR' : macro redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_logging.h(204) : see previous definition of 'COMPACT_GOOGLE_LOG_EX_ERROR'
1>d:\workspace\cef_project\third_party\chromium\src\base\logging.h(310): warning C4005: 'COMPACT_GOOGLE_LOG_EX_FATAL' : macro redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_logging.h(207) : see previous definition of 'COMPACT_GOOGLE_LOG_EX_FATAL'
1>d:\workspace\cef_project\third_party\chromium\src\base\logging.h(312): warning C4005: 'COMPACT_GOOGLE_LOG_EX_DFATAL' : macro redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_logging.h(210) : see previous definition of 'COMPACT_GOOGLE_LOG_EX_DFATAL'
1>d:\workspace\cef_project\third_party\chromium\src\base\logging.h(343): warning C4005: 'LOG_IS_ON' : macro redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_logging.h(241) : see previous definition of 'LOG_IS_ON'
1>d:\workspace\cef_project\third_party\chromium\src\base\logging.h(350): warning C4005: 'VLOG_IS_ON' : macro redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_logging.h(248) : see previous definition of 'VLOG_IS_ON'
1>d:\workspace\cef_project\third_party\chromium\src\base\logging.h(355): warning C4005: 'LAZY_STREAM' : macro redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_logging.h(253) : see previous definition of 'LAZY_STREAM'
1>d:\workspace\cef_project\third_party\chromium\src\base\logging.h(376): warning C4005: 'VLOG_STREAM' : macro redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_logging.h(274) : see previous definition of 'VLOG_STREAM'
1>d:\workspace\cef_project\third_party\chromium\src\base\logging.h(388): warning C4005: 'VPLOG_STREAM' : macro redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_logging.h(286) : see previous definition of 'VPLOG_STREAM'
1>d:\workspace\cef_project\third_party\chromium\src\base\logging.h(412): warning C4005: 'PLOG_STREAM' : macro redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_logging.h(310) : see previous definition of 'PLOG_STREAM'
1>d:\workspace\cef_project\third_party\chromium\src\base\logging.h(427): warning C4005: 'EAT_STREAM_PARAMETERS' : macro redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_logging.h(325) : see previous definition of 'EAT_STREAM_PARAMETERS'
1>d:\workspace\cef_project\third_party\chromium\src\base\logging.h(470): warning C4005: 'CHECK_OP' : macro redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_logging.h(351) : see previous definition of 'CHECK_OP'
1>d:\workspace\cef_project\third_party\chromium\src\base\logging.h(638): warning C4005: 'DCHECK_OP' : macro redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_logging.h(517) : see previous definition of 'DCHECK_OP'
1>d:\workspace\cef_project\third_party\chromium\src\base\threading\thread_collision_warner.h(135): error C2011: 'base::AsserterBase' : 'struct' type redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_thread_collision_warner.h(175) : see declaration of 'base::AsserterBase'
1>d:\workspace\cef_project\third_party\chromium\src\base\threading\thread_collision_warner.h(140): error C2011: 'base::DCheckAsserter' : 'struct' type redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_thread_collision_warner.h(180) : see declaration of 'base::DCheckAsserter'
1>d:\workspace\cef_project\third_party\chromium\src\base\threading\thread_collision_warner.h(145): error C2011: 'base::ThreadCollisionWarner' : 'class' type redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_thread_collision_warner.h(185) : see declaration of 'base::ThreadCollisionWarner'
1>d:\workspace\cef_project\third_party\chromium\src\base\memory\ref_counted.h(28): error C2011: 'base::subtle::RefCountedBase' : 'class' type redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_ref_counted.h(62) : see declaration of 'base::subtle::RefCountedBase'
1>d:\workspace\cef_project\third_party\chromium\src\base\memory\ref_counted.h(88): error C2011: 'base::subtle::RefCountedThreadSafeBase' : 'class' type redefinition
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_ref_counted.h(122) : see declaration of 'base::subtle::RefCountedThreadSafeBase'
1>d:\workspace\cef_project\third_party\chromium\src\base\memory\ref_counted.h(146): error C2953: 'base::RefCounted' : class template has already been defined
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_ref_counted.h(161) : see declaration of 'base::RefCounted'
1>d:\workspace\cef_project\third_party\chromium\src\base\memory\ref_counted.h(162): error C2953: 'base::DefaultRefCountedThreadSafeTraits' : class template has already been defined
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_ref_counted.h(188) : see declaration of 'base::DefaultRefCountedThreadSafeTraits'
1>d:\workspace\cef_project\third_party\chromium\src\base\memory\ref_counted.h(176): warning C4348: 'base::RefCountedThreadSafe' : redefinition of default parameter : parameter 2
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_ref_counted.h(211) : see declaration of 'base::RefCountedThreadSafe'
1>d:\workspace\cef_project\third_party\chromium\src\base\memory\ref_counted.h(199): error C2953: 'base::RefCountedThreadSafe' : class template has already been defined
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_ref_counted.h(211) : see declaration of 'base::RefCountedThreadSafe'
1>d:\workspace\cef_project\third_party\chromium\src\base\memory\ref_counted.h(217): error C2953: 'base::RefCountedData' : class template has already been defined
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_ref_counted.h(241) : see declaration of 'base::RefCountedData'
1>d:\workspace\cef_project\third_party\chromium\src\base\memory\ref_counted.h(365): error C2953: 'scoped_refptr' : class template has already been defined
1> d:\workspace\cef_project\third_party\chromium\src\cef\include\base\cef_ref_counted.h(304) : see declaration of 'scoped_refptr'
CaiHuan
Techie
 
Posts: 32
Joined: Fri Jun 06, 2014 8:02 am

Re: cef conflict

Postby CaiHuan » Sun Jan 25, 2015 11:18 am

if i use cef ,can i using base.lib?
CaiHuan
Techie
 
Posts: 32
Joined: Fri Jun 06, 2014 8:02 am

Re: cef conflict

Postby magreenblatt » Sun Jan 25, 2015 5:10 pm

CaiHuan wrote:if i use cef ,can i using base.lib?

Yes, but you need to always include Chromium headers before CEF headers. See for example how cef/tests/unittests works.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: cmp4694 and 53 guests