vc6以上版本才有的cl -d1reportSingleClassLayout(输出对象内存布局信息)

使用方法

cl -d1reportSingleClassLayout##classname #classname.cpp

##classname(拼接类名),#classname字符串化类名

输出结果

D:\D\Microsoft Visual Studio 14.0\VC\bin>cl -d1reportSingleClassLayoutCView CView.cpp
用于 x86 的 Microsoft (R) C/C++ 优化编译器 19.00.23026 版
版权所有(C) Microsoft Corporation。保留所有权利。

CView.cpp
class CView     size(4):
        +---
        | +--- (base class CWnd)
        | | +--- (base class CCmdTarget)
        | | | +--- (base class CObject)
 0      | | | | {vfptr}
        | | | +---
        | | +---
        | +---
        +---

CView::$vftable@:
        | &CView_meta
        |  0
 0      | &CView::GetRuntimeClass

CView::GetRuntimeClass this adjustor: 0


Microsoft (R) Incremental Linker Version 14.00.23026.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:CView.exe
CView.obj
LINK : fatal error LNK1561: 必须定义入口点

posted on 2015-09-27 00:02  coffeesoft  阅读(938)  评论(0)    收藏  举报

导航