はじめに
いつもお世話になっております。
今回、自作のアプリをMFCで作りました。
そのアプリはPthreadを使っているため別途で pthreadVC2.dll が必要になります。
しかし外部に提出する際に「実行ファイル以外のファイルは付けたくない」との理由で
実行ファイルとライブラリを一つにまとめる事になりました。
その時に調べて使ってみようと思ったのが ILMerge.exe です。
簡単に出来そうだし米マイクロソフトが出しているので問題ないと思ったのですが、
やってみるとエラーを吐き出しまくって結合してくれません。
どうぞご教授をお願いいたします(ILMerge以外にも結合する手段方法があれば教えてください)
環境
OS: Windows7 x64 pro
IDE: Visuals Studio 2005
開発言語: MFC(C++)
手順
> cd c:\app\release > ILMerge.exe /out:ClientApp_Merge.exe ClientApp.exe pthreadVC2.dll
以下のエラーが発生
An exception occurred during merging: ILMerge.Merge: Could not load assembly from the location 'C:\app\release\ClientApp.exe'. Skipping and processing rest of arguments. 場所 ILMerging.ILMerge.Merge() 場所 ILMerging.ILMerge.Main(String[] args)
とりあえず色んなサイトを見て以下の事を試しました。
- ILMerge.exe と cmd.exe を管理者モードで起動して使用する
- 上記と同様のエラーが発生する(効果なし)
- .NETFramework4.0 の場所を指定する
ILMerge.exe //targetplatform:v4,"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\Profile\Client" ClientApp.exe pthreadVC2.dll /out:ClientApp_Merge.exe
ILMerge.exe /targetplatform:v4,/targetplatform:v4,"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0" ClientApp.exe pthreadVC2.dll /out:ClientApp_Merge.exe- 上記と同様のエラーが発生する(効果なし)
備考
/log:merge-error.log
を追加してログ吐きしたら
Trying to read assembly from the file 'C:\app\release\ClientApp.exe'. Could not load assembly from the location 'C:\app\release\ClientApp.exe'. Skipping and processing rest of arguments. An exception occurred during merging: ILMerge.Merge: Could not load assembly from the location 'C:\app\release\ClientApp.exe'. Skipping and processing rest of arguments. 場所 ILMerging.ILMerge.Merge() 場所 ILMerging.ILMerge.Main(String[] args)
ClientApp.exe がロード出来ないって言われてますね。
Visuals Studio 2005 MFC で作った実行ファイルだから駄目なんでしょうかね?

回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/12/02 02:37
2016/12/02 02:53