0

ここに画像の説明を入力VS2010 で VC++ アプリケーションを実行しているときに、次のエラーが発生します:-

'26aprilmadefromnewfoldercode.exe': Loaded 'C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\26aprilmadefromnewfoldercode\Debug\26aprilmadefromnewfoldercode.exe', Symbols loaded.
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\26aprilmadefromnewfoldercode\Debug\hdpw32.dll', Binary was not built with debug information.
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\secur32.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\user32.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\setupapi.dll', Cannot find or open the PDB file
Debugger:: An unhandled non-continuable exception was thrown during process load
The program '[5800] 26aprilmadefromnewfoldercode.exe: Native' has exited with code -1073741512 

(0xc0000138)。

私のexeファイルはビルドされていますが、実行されません。プロセスの負荷をデバッグしたり、このエラーを解決するにはどうすればよいですか?

4

3 に答える 3

3

動的ライブラリのロード中に失敗したように見えるため、スタック トレースやダンプは取得されません。これを使用してできる最善の方法は、depends.exe にロードして、インポートされたライブラリとシンボルを確認することです。これにより、見つからないものがわかるはずです。

この質問を見てください:

Windows XP でアプリを実行すると、「指定されたプロシージャが見つかりませんでした」というエラーが発生する (例外 c0000139)

動的リンク時に使用できない API に対してリンクを試みるとどうなるか、およびdepends.exe を使用してそれをデバッグする方法を示します。

于 2012-04-27T12:06:59.223 に答える
3

0xC0000138: Ordinal Not Foundプラグイン DLL をロードする Windows プロセスで、まったく同じ例外が発生しました。このエラーは、同じプロセスに読み込まれたCOMCTL32の 2 つの異なるバージョンが原因でした。

デバッガー (またはProcess Monitor ) を使用して、次のように 2 つの COMCTL32 モジュールが読み込まれないかどうかを確認してください。

...
'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18201_none_ec80f00e8593ece5\comctl32.dll'. Symbols loaded.
...
'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll'. Symbols loaded.

その場合は、明示的な COMCTL32 参照をアプリケーションのマニフェストに追加します。

<dependency>
  <dependentAssembly>
    <assemblyIdentity type="win32" 
      name="Microsoft.Windows.Common-Controls" version="6.0.0.0"
      processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*">
    </assemblyIdentity>
  </dependentAssembly>
</dependency>

MSDN: ビジュアル スタイルの有効化の記事で説明されている方法の 1 つを使用します。

于 2014-10-30T12:44:58.553 に答える
1

dll がクラスをエクスポートし、別のバージョンのランタイム ライブラリでビルドされた場合に発生する可能性があります。したがって、すべての dll が、メイン アプリケーションのビルドに使用するものと同じコンパイラでビルドされているかどうかを確認する必要があります。あなたがする必要があるのは、ソリューションをクリアして、あなたが持っている古いバージョンを置き換える新しいlib、dllを構築することだけです.

于 2012-04-27T10:59:59.797 に答える