DxlibでReleaseビルド
Posted: 2013年10月24日(木) 19:03
現在VS2010ProとDxlibを使って、ゲーム制作をしています。
Releaseビルドを行うと、以下のような警告が出ました。
1>------ ビルド開始: プロジェクト: Shooting, 構成: Release Win32 ------
1>boss.obj : error LNK2001: 外部シンボル "@__security_check_cookie@4" は未解決です。
1>boss.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::GetRand(int)" (?GetRand@DxLib@@YAHH@Z)" は未解決です。
1>boss.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::DrawGraph(int,int,int,int)" (?DrawGraph@DxLib@@YAHHHHH@Z)" は未解決です。
1>en_bullet.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::SetDrawBlendMode(int,int)" (?SetDrawBlendMode@DxLib@@YAHHH@Z)" は未解決です。
1>en_bullet.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::DrawRotaGraph2(int,int,int,int,double,double,int,int,int)" (?DrawRotaGraph2@DxLib@@YAHHHHHNNHHH@Z)" は未解決です。
1>game.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::DrawRectGraph(int,int,int,int,int,int,int,int,int)" (?DrawRectGraph@DxLib@@YAHHHHHHHHHH@Z)" は未解決です。
1>game.obj : error LNK2001: 外部シンボル ""unsigned long __cdecl DxLib::GetColor(int,int,int)" (?GetColor@DxLib@@YAKHHH@Z)" は未解決です。
1>game.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::DrawFormatString(int,int,int,char const *,...)" (?DrawFormatString@DxLib@@YAHHHHPBDZZ)" は未解決です。
1>init.obj : error LNK2001: 外部シンボル "_atoi" は未解決です。
1>init.obj : error LNK2001: 外部シンボル "_vsprintf_s" は未解決です。
1>init.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::FileRead_close(int)" (?FileRead_close@DxLib@@YAHH@Z)" は未解決です。
1>init.obj : error LNK2001: 外部シンボル ""char __cdecl DxLib::FileRead_getc(int)" (?FileRead_getc@DxLib@@YADH@Z)" は未解決です。
1>init.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::LoadDivGraph(char const *,int,int,int,int,int,int *,int)" (?LoadDivGraph@DxLib@@YAHPBDHHHHHPAHH@Z)" は未解決です。
1>init.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::FileRead_open(char const *,int)" (?FileRead_open@DxLib@@YAHPBDH@Z)" は未解決です。
1>init.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::DerivationGraph(int,int,int,int,int)" (?DerivationGraph@DxLib@@YAHHHHHH@Z)" は未解決です。
1>init.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::LoadGraph(char const *,int)" (?LoadGraph@DxLib@@YAHPBDH@Z)" は未解決です。
1>init.obj : error LNK2001: 外部シンボル "_atof" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::ClearDrawScreen(struct tagRECT *)" (?ClearDrawScreen@DxLib@@YAHPAUtagRECT@@@Z)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::ProcessMessage(void)" (?ProcessMessage@DxLib@@YAHXZ)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::SetDrawMode(int)" (?SetDrawMode@DxLib@@YAHH@Z)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::DxLib_Init(void)" (?DxLib_Init@DxLib@@YAHXZ)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::CheckHitKey(int)" (?CheckHitKey@DxLib@@YAHH@Z)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::SetDrawScreen(int)" (?SetDrawScreen@DxLib@@YAHH@Z)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::SetWindowTextA(char const *)" (?SetWindowTextA@DxLib@@YAHPBD@Z)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::DxLib_End(void)" (?DxLib_End@DxLib@@YAHXZ)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::SetGraphMode(int,int,int,int)" (?SetGraphMode@DxLib@@YAHHHHH@Z)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::ChangeWindowMode(int)" (?ChangeWindowMode@DxLib@@YAHH@Z)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::ScreenFlip(void)" (?ScreenFlip@DxLib@@YAHXZ)" は未解決です。
1>player.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::GetHitKeyStateAll(char *)" (?GetHitKeyStateAll@DxLib@@YAHPAD@Z)" は未解決です。
1>LINK : error LNK2001: 外部シンボル "_WinMainCRTStartup" は未解決です。
1>C:\Users\~省略~\Visual Studio 2010\Projects\Shooting\Release\Shooting.exe : fatal error LNK1120: 外部参照 30 が未解決です。
========== ビルド: 0 正常終了、1 失敗、0 更新不要、0 スキップ ==========
個人名などがあるところは少し変えてますが、基本そのままです。
Debugビルドの時は何の問題もなく成功しますが、Releaseビルドにするとこのエラーが出ます。
エラーの中身から、Releaseでの設定ミスかなと思うのですが、
マルチバイト文字セットを使用する に変更してありますし、
C/C++->全般->追加のインクルードディレクトリ と リンカー->全般->追加のライブラリディレクトリ には、Debugと同じ、Dxlibの追加するフォルダを入れてあります。
C/C++->コード生成->ランタイムライブラリ は、マルチスレッド(/MT)に変更してあります。
何か不足している部分や、解決方法があれば、ぜひ教えてください。
よろしくお願いします。
Releaseビルドを行うと、以下のような警告が出ました。
1>------ ビルド開始: プロジェクト: Shooting, 構成: Release Win32 ------
1>boss.obj : error LNK2001: 外部シンボル "@__security_check_cookie@4" は未解決です。
1>boss.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::GetRand(int)" (?GetRand@DxLib@@YAHH@Z)" は未解決です。
1>boss.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::DrawGraph(int,int,int,int)" (?DrawGraph@DxLib@@YAHHHHH@Z)" は未解決です。
1>en_bullet.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::SetDrawBlendMode(int,int)" (?SetDrawBlendMode@DxLib@@YAHHH@Z)" は未解決です。
1>en_bullet.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::DrawRotaGraph2(int,int,int,int,double,double,int,int,int)" (?DrawRotaGraph2@DxLib@@YAHHHHHNNHHH@Z)" は未解決です。
1>game.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::DrawRectGraph(int,int,int,int,int,int,int,int,int)" (?DrawRectGraph@DxLib@@YAHHHHHHHHHH@Z)" は未解決です。
1>game.obj : error LNK2001: 外部シンボル ""unsigned long __cdecl DxLib::GetColor(int,int,int)" (?GetColor@DxLib@@YAKHHH@Z)" は未解決です。
1>game.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::DrawFormatString(int,int,int,char const *,...)" (?DrawFormatString@DxLib@@YAHHHHPBDZZ)" は未解決です。
1>init.obj : error LNK2001: 外部シンボル "_atoi" は未解決です。
1>init.obj : error LNK2001: 外部シンボル "_vsprintf_s" は未解決です。
1>init.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::FileRead_close(int)" (?FileRead_close@DxLib@@YAHH@Z)" は未解決です。
1>init.obj : error LNK2001: 外部シンボル ""char __cdecl DxLib::FileRead_getc(int)" (?FileRead_getc@DxLib@@YADH@Z)" は未解決です。
1>init.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::LoadDivGraph(char const *,int,int,int,int,int,int *,int)" (?LoadDivGraph@DxLib@@YAHPBDHHHHHPAHH@Z)" は未解決です。
1>init.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::FileRead_open(char const *,int)" (?FileRead_open@DxLib@@YAHPBDH@Z)" は未解決です。
1>init.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::DerivationGraph(int,int,int,int,int)" (?DerivationGraph@DxLib@@YAHHHHHH@Z)" は未解決です。
1>init.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::LoadGraph(char const *,int)" (?LoadGraph@DxLib@@YAHPBDH@Z)" は未解決です。
1>init.obj : error LNK2001: 外部シンボル "_atof" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::ClearDrawScreen(struct tagRECT *)" (?ClearDrawScreen@DxLib@@YAHPAUtagRECT@@@Z)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::ProcessMessage(void)" (?ProcessMessage@DxLib@@YAHXZ)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::SetDrawMode(int)" (?SetDrawMode@DxLib@@YAHH@Z)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::DxLib_Init(void)" (?DxLib_Init@DxLib@@YAHXZ)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::CheckHitKey(int)" (?CheckHitKey@DxLib@@YAHH@Z)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::SetDrawScreen(int)" (?SetDrawScreen@DxLib@@YAHH@Z)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::SetWindowTextA(char const *)" (?SetWindowTextA@DxLib@@YAHPBD@Z)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::DxLib_End(void)" (?DxLib_End@DxLib@@YAHXZ)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::SetGraphMode(int,int,int,int)" (?SetGraphMode@DxLib@@YAHHHHH@Z)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::ChangeWindowMode(int)" (?ChangeWindowMode@DxLib@@YAHH@Z)" は未解決です。
1>main.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::ScreenFlip(void)" (?ScreenFlip@DxLib@@YAHXZ)" は未解決です。
1>player.obj : error LNK2001: 外部シンボル ""int __cdecl DxLib::GetHitKeyStateAll(char *)" (?GetHitKeyStateAll@DxLib@@YAHPAD@Z)" は未解決です。
1>LINK : error LNK2001: 外部シンボル "_WinMainCRTStartup" は未解決です。
1>C:\Users\~省略~\Visual Studio 2010\Projects\Shooting\Release\Shooting.exe : fatal error LNK1120: 外部参照 30 が未解決です。
========== ビルド: 0 正常終了、1 失敗、0 更新不要、0 スキップ ==========
個人名などがあるところは少し変えてますが、基本そのままです。
Debugビルドの時は何の問題もなく成功しますが、Releaseビルドにするとこのエラーが出ます。
エラーの中身から、Releaseでの設定ミスかなと思うのですが、
マルチバイト文字セットを使用する に変更してありますし、
C/C++->全般->追加のインクルードディレクトリ と リンカー->全般->追加のライブラリディレクトリ には、Debugと同じ、Dxlibの追加するフォルダを入れてあります。
C/C++->コード生成->ランタイムライブラリ は、マルチスレッド(/MT)に変更してあります。
何か不足している部分や、解決方法があれば、ぜひ教えてください。
よろしくお願いします。