LoginSignup
4
2

More than 5 years have passed since last update.

Cygwinのコマンドプロンプトで「cygcheck <EXEのパス>」を実行するとDLLの依存関係を調べられます (Visual C++ のランタイムDLLがリンクされているかどうかチェックしたりする時などに)

Last updated at Posted at 2017-04-25

#Visual C++ のランタイムDLLがリンクされているかどうかチェックしたりする時などに

Cygwinのコマンドプロンプトで「cygcheck <EXEのパス>」を実行するとDLLの依存関係を調べられます。

  • VCランタイムをスタティックリンクしたはずだが?というときに cygcheck を使うと便利です。
  • CygwinランタイムDLL、MinGW(gcc/g++)ランタイムDLL等に依存してないかも(当然)わかります。
$ which notepad
/cygdrive/c/Windows/system32/notepad

$ cygcheck `which notepad`
c:\Windows\system32\notepad.exe
  C:\Windows\system32\ADVAPI32.dll
    C:\Windows\system32\msvcrt.dll
      C:\Windows\system32\ntdll.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-console-l1-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-handle-l1-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-profile-l1-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-string-l1-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-synch-l1-2-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-util-l1-1-0.dll
      C:\Windows\system32\KERNELBASE.dll
    C:\Windows\system32\SECHOST.dll
      C:\Windows\system32\RPCRT4.dll
        C:\Program Files\TortoiseSVN\bin\api-ms-win-core-timezone-l1-1-0.dll
        C:\Windows\system32\SspiCli.dll
          C:\Windows\system32\CRYPTBASE.dll
            C:\Windows\system32\bcryptPrimitives.dll
    C:\Windows\system32\KERNEL32.dll
  C:\Windows\system32\GDI32.dll
  C:\Windows\system32\USER32.dll
    C:\Windows\system32\win32u.dll
  C:\Windows\system32\OLEAUT32.dll
    C:\Windows\system32\msvcp_win.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-crt-string-l1-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-crt-locale-l1-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-crt-runtime-l1-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-crt-private-l1-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-synch-l1-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-processthreads-l1-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-file-l1-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-file-l2-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-file-l1-2-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-errorhandling-l1-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-localization-l1-2-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-rtlsupport-l1-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-processthreads-l1-1-1.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-debug-l1-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-sysinfo-l1-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-libraryloader-l1-1-0.dll
      C:\Program Files\TortoiseSVN\bin\api-ms-win-core-interlocked-l1-1-0.dll
    C:\Windows\system32\combase.dll
  C:\Windows\system32\COMCTL32.dll
  C:\Windows\system32\COMDLG32.dll
    C:\Windows\system32\SHLWAPI.dll
    C:\Windows\system32\SHELL32.dll
  C:\Windows\system32\FeClient.dll
  C:\Windows\system32\PROPSYS.dll
  C:\Windows\system32\WINSPOOL.DRV
    C:\Windows\system32\bcrypt.dll
  C:\Windows\system32\urlmon.dll
    C:\Windows\system32\iertutil.dll

$ 

Cygwinを簡単にインストールしたいなら・・・

この記事もお勧めします⇩ (cygcheckコマンドは特に追加パッケージを指定しなくてもデフォルトでインストールされます)

『Cygwinインストール革命 (Mac/Linuxユーザーに朗報。Windows上で tmux(端末多重化ソフト) や vim が使える環境が3分で構築できます!emacs, git や Xサーバーも追加インストール可能) - Qiita』

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2