I tried to use google perftools on Windows. I compiled the source code in VS2010 and started a ne开发者_如何学JAVAw test project and tried to link the libtcmalloc_minimal-debug.dll
, and it failed with following error:
fatal error LNK1107: invalid or corrupt file: cannot read at 0x338
What did I miss? Thanks
I searched around the Project page and found this
The important points are:
- solution file can be loaded into VS2003 or VS2005
- To use tcmalloc_minimal in your own projects, you should only need to build the dll and install it someplace, so you can link it into further binaries. To use the dll, you need to add the following to the linker line of your executable: "libtcmalloc_minimal.lib" /INCLUDE:"__tcmalloc"
This file is a little older (Jan 2010), but may at least start you in the right direction
精彩评论