I tried to build views_unittests in Windows and got the following error:
202>Linking...
202>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __malloc_dbg already defined in allocator.lib(allocator_shim.obj)
202>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __calloc_dbg already defined in allocator.lib(allocator_shim.obj)
202>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __recalloc already defined in allocator.lib(allocator_shim.obj)
202>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __expand already defined in allocator.lib(jemalloc.obj)
202>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __free_dbg already defined in allocator.lib(allocator_shim.obj)
202>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __msize already defined in allocator.lib(allocator_shim.obj)
202>LIBCMTD.lib(heapinit.obj) : error LNK2005: __heap_init already defined in allocator.lib(allocator_shim.obj)
202>LIBCMTD.lib(heapinit.obj) : error LNK2005: __heap_term already defined in allocator.lib(allocator_shim.obj)
202>LIBCMTD.lib(heapinit.obj) : error LNK2005: __get_heap_handle already defined in allocator.lib(allocator_shim.obj)
202>LIBCMTD.lib(heapinit.obj) : error LNK2005: __crtheap already defined in allocator.lib(allocator_shim.obj)
202>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
202>../..\build\Debug\views_unittests.exe : fatal error LNK1169: one or more multiply defined symbols found
202>Project : warning PRJ0018 : The following environment variables were not found:
202>$(DXSDK_DIR)
202>Build log was saved at "file://d:\chromium\trunk\src\build\Debug\obj\views_unittests\BuildLog.htm"
202>views_unittests - 11 error(s), 1 warning(s)
The value of (views_unittests property pages ->Configuration properties -> C/C++ ->Code generation ->Runtime Library) is "Multi-threaded Debug (/MTd)".
From msdn doc, seems that the above error is caused by the objects are building with different runtime library.
But I did a fresh rebuild using VS2008 (wipe out build/Debug and closed VS before sync, then run "gclient sync --force", then run "GYP_DEFINES="disable_nacl=1" gclient runhooks", then rebuild views_unittests).
I tried to use /NODEFAULTLIB (set in Linker->Input->Ignore All Default Libraries), but that caused a lot of unresolved symbols.
Anyone experienced the same problem (it used to work for me a while ago).
Thanks,
Xiaomei