Erik Wright
unread,Jul 10, 2012, 2:21:30 PM7/10/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium-dev
Hi Team, I'm getting the following mysterious build error while linking chrome_main_dll:
3>libcpmtd.lib(locale.obj) : error LNK2019: unresolved external symbol __realloc_dbg referenced in function "private: static void __cdecl std::locale::_Locimp::_Locimp_Addfac(class std::locale::_Locimp *,class std::locale::facet *,unsigned int)" (?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z)
This is a static configuration in VS 2008.
I see that Additional Dependencies contains $(OutDir)\obj\global_intermediate\allocator\libcmt.lib while Ignore Specific Library is "libcmtd.lib;libcmt.lib".
After investigation, I see that this probably has something to do with base/allocator. On the surface, it would appear that this script is only changing the libcmt.lib, so I assume that even debug builds are meant to link against the release libcmt.lib (and presumably libcpmt.lib) when using the allocator shim? But the code in common.gypi doesn't seem to consider that.
Disabling the allocator shim ( 'win_use_allocator_shim': 0 in include.gypi) seems to work.
History:
* This checkout used to be component, but two+ weeks
ago I switched it to static. I am pretty sure everything was building
fine at that point.
* I went on holiday.
* Today I sync'd, cleaned my build, and tried to build the mini_installer solution off of trunk. I received the above error.
* I then tried to totally wipe my source tree (git clean -x -f -d) and try again, but I got the same error.
Thanks for any ideas on how to solve the root problem here (though my own work is no longer blocked, having found the workaround after about 4 hours of investigation).
Erik