DxlibでReleaseビルド

フォーラム(掲示板)ルール
フォーラム(掲示板)ルールはこちら  ※コードを貼り付ける場合は [code][/code] で囲って下さい。詳しくはこちら
タンタル

DxlibでReleaseビルド

#1

投稿記事 by タンタル » 12年前

現在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)に変更してあります。

何か不足している部分や、解決方法があれば、ぜひ教えてください。
よろしくお願いします。

アバター
softya(ソフト屋)
副管理人
記事: 11677
登録日時: 15年前
住所: 東海地方
連絡を取る:

Re: DxlibでReleaseビルド

#2

投稿記事 by softya(ソフト屋) » 12年前

リビルドしてみてください。
あとWinMainもリンクエラーのようですがmain.cppにありますよね?
by softya(ソフト屋) 方針:私は仕組み・考え方を理解して欲しいので直接的なコードを回答することはまれですので、すぐコードがほしい方はその旨をご明記下さい。私以外の方と交代したいと思います(代わりの方がいる保証は出来かねます)。

タンタル

Re: DxlibでReleaseビルド

#3

投稿記事 by タンタル » 12年前

ご返答ありがとうございます。
せっかく時間を割いていただいて、申し上げにくいのですが...

えー、本当に申し訳ありません。設定ミスは設定ミスだったのですが...
リンカー->入力->すべての既定のライブラリの無視 がなぜか太字で はい になっていまして、それを消したら通りました。

お騒がせしました。本当に申し訳ありませんでした。

閉鎖

“C言語何でも質問掲示板” へ戻る