windows.h包含了sql.h么咋找不到他们间的包含关系
去年学 Perl 的时候写了一个脚本枚举库文件包含的关系链(用 if 语句限制了递归层的)=info 523066680@163.com 2015-06-09=cutuse IO::Handle;STDOUT-\u0026gt;autoflush(1);our @dirs = ( "C:/MinGW/x86_64-w64-mingw32/include", "C:/MinGW/Include");our %name;our %hash;my $headfile = "windows.h";func(0, ".", $headfile);tree(\\%hash);sub func { our @dirs; our %hash; our %name; my $fullpath; my ($Lv, $parent, $fname) = @_; my @all; return if (exists $name{$fname}); $name{$fname} = 1; $hash{$parent.":".$fname} = $Lv; foreach (@dirs) { $fullpath = "$_/$fname" if (-e "$_/$fname"); } return 0 if (! defined $fullpath); ReadFile(\\@all, $fullpath); foreach (@all) { if (/#include\\s+(.*)/) { if ($Lv \u0026lt; 6) { func($Lv+1, $parent.":".$fname, $1); } } }}sub tree { my $ref = shift; my ($a, $b); my ($e, $v) = (-1, undef); foreach (sort keys %$ref) { $v = $ref-\u0026gt;{$_}; s/(.*:)(+)$/$2/; if ( $v \u0026lt;= $e) { print "\" . " "x(length($1) - $v - 2 + ($v)*3); } print " \u0026gt; " . $2; $e = $v; }}sub ReadFile { my ($aref, $fullpath) = (shift, shift); open READ, "\u0026lt;", $fullpath or die "$!\"; @{$aref} = \u0026lt;READ\u0026gt;; close READ;}渣代码见笑了,但好像即使不限制递归层也看不到 sdl.h,输出的依赖关系树如下: \u0026gt; windows.h \u0026gt; _mingw.h \u0026gt; _cygwin.h \u0026gt; stddef.h \u0026gt; crtdefs.h \u0026gt; _mingw_mac.h \u0026gt; _mingw_secapi.h \u0026gt; sdks/_mingw_ddk.h \u0026gt; sdks/_mingw_directx.h \u0026gt; vadefs.h \u0026gt; cderr.h \u0026gt; commdlg.h \u0026gt; dde.h \u0026gt; ddeml.h \u0026gt; excpt.h \u0026gt; imm.h \u0026gt; lzexpand.h \u0026gt; mcx.h \u0026gt; mmsystem.h \u0026gt; nb30.h \u0026gt; ole.h \u0026gt; rpc.h \u0026gt; rpcasync.h \u0026gt; rpcdce.h \u0026gt; rpcdcep.h \u0026gt; rpcnsi.h \u0026gt; rpcnterr.h \u0026gt; sdkddkver.h \u0026gt; shellapi.h \u0026gt; stdarg.h \u0026gt; _mingw_stdarg.h \u0026gt; stralign.h \u0026gt; sec_api/stralign_s.h \u0026gt; virtdisk.h \u0026gt; winbase.h \u0026gt; apisetcconv.h \u0026gt; bemapiset.h \u0026gt; debugapi.h \u0026gt; errhandlingapi.h \u0026gt; fibersapi.h \u0026gt; fileapi.h \u0026gt; handleapi.h \u0026gt; heapapi.h \u0026gt; interlockedapi.h \u0026gt; ioapiset.h \u0026gt; jobapi.h \u0026gt; libloaderapi.h \u0026gt; memoryapi.h \u0026gt; minwinbase.h \u0026gt; namedpipeapi.h \u0026gt; namespaceapi.h \u0026gt; processenv.h \u0026gt; processthreadsapi.h \u0026gt; processtopologyapi.h \u0026gt; profileapi.h \u0026gt; realtimeapiset.h \u0026gt; securityappcontainer.h \u0026gt; securitybaseapi.h \u0026gt; synchapi.h \u0026gt; sysinfoapi.h \u0026gt; systemtopologyapi.h \u0026gt; threadpoolapiset.h \u0026gt; threadpoollegacyapiset.h \u0026gt; timezoneapi.h \u0026gt; utilapiset.h \u0026gt; winerror.h \u0026gt; fltwinerror.h \u0026gt; wow64apiset.h \u0026gt; wincon.h \u0026gt; wincrypt.h \u0026gt; bcrypt.h \u0026gt; dpapi.h \u0026gt; ncrypt.h \u0026gt; windef.h \u0026gt; minwindef.h \u0026gt; specstrings.h \u0026gt; sal.h \u0026gt; winapifamily.h \u0026gt; winnt.h \u0026gt; apiset.h \u0026gt; basetsd.h \u0026gt; ctype.h \u0026gt; guiddef.h \u0026gt; string.h \u0026gt; sec_api/string_s.h \u0026gt; ktmtypes.h \u0026gt; poppack.h \u0026gt; psdk_inc/intrin-impl.h \u0026gt; intrin.h \u0026gt; emmintrin.h \u0026gt; errno.h \u0026gt; malloc.h \u0026gt; mm3dnow.h \u0026gt; mmintrin.h \u0026gt; pmmintrin.h \u0026gt; setjmp.h \u0026gt; stdlib.h \u0026gt; x86intrin.h \u0026gt; xmmintrin.h \u0026gt; pshpack2.h \u0026gt; pshpack4.h \u0026gt; pshpack8.h \u0026gt; winefs.h \u0026gt; wingdi.h \u0026gt; pshpack1.h \u0026gt; winnetwk.h \u0026gt; wnnc.h \u0026gt; winnls.h \u0026gt; datetimeapi.h \u0026gt; stringapiset.h \u0026gt; winperf.h \u0026gt; winreg.h \u0026gt; reason.h \u0026gt; winresrc.h \u0026gt; commctrl.rh \u0026gt; dde.rh \u0026gt; dlgs.h \u0026gt; winnt.rh \u0026gt; winuser.rh \u0026gt; winver.h \u0026gt; _mingw_unicode.h \u0026gt; winscard.h \u0026gt; SCardErr.h \u0026gt; winioctl.h \u0026gt; winsmcrd.h \u0026gt; wtypes.h \u0026gt; ole2.h \u0026gt; objbase.h \u0026gt; combaseapi.h \u0026gt; cguid.h \u0026gt; objidlbase.h \u0026gt; unknwnbase.h \u0026gt; wtypesbase.h \u0026gt; objidl.h \u0026gt; unknwn.h \u0026gt; propidl.h \u0026gt; oaidl.h \u0026gt; urlmon.h \u0026gt; msxml.h \u0026gt; oleidl.h \u0026gt; servprov.h \u0026gt; oleauto.h \u0026gt; rpcndr.h \u0026gt; rpcnsip.h \u0026gt; rpcsal.h \u0026gt; winsock.h \u0026gt; _bsd_types.h \u0026gt; _timeval.h \u0026gt; inaddr.h \u0026gt; psdk_inc/_fd_types.h \u0026gt; psdk_inc/_ip_mreq1.h \u0026gt; psdk_inc/_ip_types.h \u0026gt; psdk_inc/_socket_types.h \u0026gt; psdk_inc/_wsa_errnos.h \u0026gt; psdk_inc/_wsadata.h \u0026gt; psdk_inc/_xmitfile.h \u0026gt; winspool.h \u0026gt; prsht.h \u0026gt; winsvc.h \u0026gt; winuser.h \u0026gt; tvout.h
推荐阅读
- Windows中文件名最大字符数
- 《uptown funk 100部电影跳起来》这个视频里包含了哪些电影
- 怎样利用包含 xyz 坐标的 txt 文件转生成 DEM
- 身份证号包含哪些信息,分别咋读取这些信息
- 802.11网络协议中的那个帧中包含网络信号强度这个参数
- 一个安全的账号体系应该包含哪些模块或要素,怎样设计安全架构
- 我想做一个地级市本地商家展示平台,包含优惠券,团购,点评等。请各位大虾给一些意见。
- 大众|三款颜值掀背车,最低8万多,包含曝光的大众CC猎装版
- 有没有人可以详细分析下一个好的网校需包含啥,或者说一个完善的在线教育平台,应该有咋样的系统构成
- mg|预售9.98万起,包含1.5T/2.0T,MG领航开启盲订
