3節 画像を表示する

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

3節 画像を表示する

#1

投稿記事 by 初めてのC » 17年前

自分なりに検索したりしましたが解決しそうにありませんのでお力を貸していただけたらと思い投稿させていただきました。

初心者でどう質問していいかもわかりませんが、解決法がありましたらお願いします。
BCC Developerを使ってます。ウインドウモードまでは正常になりましたが何故か画像が表示されません。とくにエラーの表示もなくどうしていいか困ってます。よろしくお願いします。

初めてのC

Re:3節 画像を表示する

#2

投稿記事 by 初めてのC » 17年前

// ここにサンプルプログラムをペーストしてください
// 初期状態では LoadGraphScreen のサンプルプログラムが入力されています。
#include "DxLib.h"


int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow ){
ChangeWindowMode( TRUE ) ; // ウインドウモードに変更

if( DxLib_Init() == -1 ) // DXライブラリ初期化処理
{
return -1; // エラーが起きたら直ちに終了
}

// BMP画像の表示
LoadGraphScreen( 0 , 0 , "back.bmp" , FALSE ) ;
LoadGraphScreen(0,0,"char.png",TRUE);

WaitKey() ; // キーの入力待ち((7-3)『WaitKey』を使用)

DxLib_End() ; // DXライブラリ使用の終了処理

return 0 ; // ソフトの終了
}

管理人

Re:3節 画像を表示する

#3

投稿記事 by 管理人 » 17年前

Debugフォルダにちゃんと画像は入っていますか?
http://dixq.net/g/trouble.html
こちらを実行するとどう結果が表示されますか?

初めてのC

Re:3節 画像を表示する

#4

投稿記事 by 初めてのC » 17年前

回答ありがとうございます。
画像ですが背景もキャラもDebugフォルダに入れてました。

そちらを実行してみたところ下のようなエラーがでました。これはやり方が間違ってるのでしょうか^^;


> C:\borland\bcc55\Bin\make.exe -fDebug\test.mak -B TARGET
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
bcc32 -W -3 -Od -w- -AT -pc -H- -k -b -v -y -DDEBUG -nDebug -c "C:\Documents and Settings\c_language\test\test\dousa.c"
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
C:\Documents and Settings\c_language\test\test\dousa.c:
エラー E2141 C:\Documents and Settings\c_language\test\test\DxDirectX.h 894: 宣言の構文エラー
エラー E2141 C:\Documents and Settings\c_language\test\test\DxDirectX.h 908: 宣言の構文エラー
エラー E2141 C:\Documents and Settings\c_language\test\test\DxDirectX.h 914: 宣言の構文エラー
エラー E2141 C:\Documents and Settings\c_language\test\test\DxDirectX.h 937: 宣言の構文エラー
エラー E2141 C:\Documents and Settings\c_language\test\test\DxDirectX.h 945: 宣言の構文エラー
エラー E2141 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1027: 宣言の構文エラー
エラー E2141 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1041: 宣言の構文エラー
エラー E2141 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1047: 宣言の構文エラー
エラー E2141 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1057: 宣言の構文エラー
エラー E2141 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1085: 宣言の構文エラー
エラー E2141 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1095: 宣言の構文エラー
エラー E2141 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1109: 宣言の構文エラー
エラー E2141 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1117: 宣言の構文エラー
エラー E2141 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1163: 宣言の構文エラー
エラー E2139 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1507: 宣言に ; がない
エラー E2139 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1513: 宣言に ; がない
エラー E2238 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1514: 'class' の宣言が複数見つかった
エラー E2344 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1507: 一つ前の 'class' の定義位置
エラー E2139 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1522: 宣言に ; がない
エラー E2238 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1523: 'class' の宣言が複数見つかった
エラー E2344 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1507: 一つ前の 'class' の定義位置
エラー E2139 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1528: 宣言に ; がない
エラー E2238 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1529: 'class' の宣言が複数見つかった
エラー E2344 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1507: 一つ前の 'class' の定義位置
エラー E2139 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1535: 宣言に ; がない
エラー E2228 C:\Documents and Settings\c_language\test\test\DxDirectX.h 1535: エラーあるいは警告が多すぎる
*** 26 errors in Compile ***

** error 1 ** deleting Debug\dousa.obj

Make End !! (Elapsed time 0:00.390)

初めてのC

Re:3節 画像を表示する

#5

投稿記事 by 初めてのC » 17年前

なんとか自己解決できました。アドバイスくださった管理人様ありがとうございました。

閉鎖

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