ページ 11

4.「キャラを描画してみよう」のところなのですが・・・

Posted: 2012年8月28日(火) 14:29
by mi_l
私はVC++2010Expressでやっています。初めから順にやっていってるのですがキャラを描画してみようのところでつまずいてます・・・
一応コードを書いて、ビルドエラーしたら見直してそれでもわからなかったときはそのままコピペしてやってますが、そのままコピペしてもビルドエラーがでてしまいます・・シンボルがどうだとか・・・
理由とどうすればよいか教えてください。よろしくお願いします。

Re: 4.「キャラを描画してみよう」のところなのですが・・・

Posted: 2012年8月28日(火) 14:53
by softya(ソフト屋)
勘では答えられないので正確なエラーメッセージとプログラムコードをそのまま貼ってください。
codeタグの利用をお忘れなく。 http://dixq.net/board/board.html#k10

Re: 4.「キャラを描画してみよう」のところなのですが・・・

Posted: 2012年8月28日(火) 15:14
by mi_l
先ず、struct.hです。

コード:

//キャラクターに関する構造体
typedef struct{
        int flag;       //フラグ
        int cnt;        //カウンタ
        int power;      //パワー
        int point;      //ポイント
        int score;      //スコア
        int num;        //残機数
        int mutekicnt;  //無敵状態とカウント
        int shot_mode;  //ショットモード
        int money;      //お金
        int img;        //画像
        int slow;       //スローかどうか
        double x,y;     //座標
}ch_t;
次にload.cppです。

コード:

#include "../include/GV.h"
#include "DxLib.h"

extern int img_ch[2][12];

void load(){
        LoadDivGraph( "../dat/img/char/0.png" , 12 , 4 , 3 , 73 , 73 , img_ch[0] ) ;
}
次にgraph.cppです。

コード:

#include "../include/GV.h"
#include "DxLib.h"

extern ch_t ch;
extern int img_ch[2][12];

void graph_ch(){
        DrawRotaGraphF(ch.x,ch.y,1.0f,0.0f,img_ch[0][ch.img],TRUE);
}

void graph_main(){
        graph_ch();
}
最後にmain.cppです。

コード:

#define GLOBAL_INSTANCE 
#include "../include/GV.h"
#include "DxLib.h"

//現在のキー入力処理を行う
extern int GetHitKeyStateAll_2();
//受け取ったキー番号の現在の入力状態を返す
extern int CheckStateKey(unsigned char Handle);

//データのロード
extern void load();

//描画メイン
extern void graph_main();

int img_ch[2][12];      //キャラクタ画像9枚分 X2(変身用)
ch_t ch;                        //キャラクタデータ

//ループで必ず行う3大処理
int ProcessLoop(){
        if(ProcessMessage()!=0)return -1;//プロセス処理がエラーなら-1を返す
        if(ClearDrawScreen()!=0)return -1;//画面クリア処理がエラーなら-1を返す
        GetHitKeyStateAll_2();//現在のキー入力処理を行う
        return 0;
}

int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow){
    ChangeWindowMode(TRUE);//ウィンドウモード
    if(DxLib_Init() == -1 || SetDrawScreen( DX_SCREEN_BACK )!=0) return -1;//初期化と裏画面化

    load();//データロード

    while(ProcessLoop()==0){//メインループ
                
        graph_main();//描画メイン

        if(CheckStateKey(KEY_INPUT_ESCAPE)==1)break;//エスケープが入力されたらブレイク
        ScreenFlip();//裏画面反映
    }

    DxLib_End();//DXライブラリ終了処理
    return 0;
}
そしてエラーメッセージです(*部分はユーザー名なので)

1>------ ビルド開始: プロジェクト: RyuJin, 構成: Debug Win32 ------
1> main.cpp
1>c:\users\**********\downloads\dx\project\1章\mydat\source\main.cpp(18): error C2146: 構文エラー : ';' が、識別子 'ch' の前に必要です。
1>c:\users\************\downloads\dx\project\1章\mydat\source\main.cpp(18): error C4430: 型指定子がありません - int と仮定しました。メモ: C++ は int を既定値としてサポートしていません
1>c:\users\**********\downloads\dx\project\1章\mydat\source\main.cpp(18): error C4430: 型指定子がありません - int と仮定しました。メモ: C++ は int を既定値としてサポートしていません
1> load.cpp
1> graph.cpp
1>c:\users\**********\downloads\dx\project\1章\mydat\source\graph.cpp(4): error C2146: 構文エラー : ';' が、識別子 'ch' の前に必要です。
1>c:\users\**********\downloads\dx\project\1章\mydat\source\graph.cpp(4): error C4430: 型指定子がありません - int と仮定しました。メモ: C++ は int を既定値としてサポートしていません
1>c:\users\************\downloads\dx\project\1章\mydat\source\graph.cpp(4): error C4430: 型指定子がありません - int と仮定しました。メモ: C++ は int を既定値としてサポートしていません
1>c:\users\*************\downloads\dx\project\1章\mydat\source\graph.cpp(8): error C2228: '.x' の左側はクラス、構造体、共用体でなければなりません
1> 型は 'int' です。
1>c:\users\***********\downloads\dx\project\1章\mydat\source\graph.cpp(8): error C2228: '.y' の左側はクラス、構造体、共用体でなければなりません
1> 型は 'int' です。
1>c:\users\***********\downloads\dx\project\1章\mydat\source\graph.cpp(8): error C2228: '.img' の左側はクラス、構造体、共用体でなければなりません
1> 型は 'int' です。
1> コードを生成中...
========== ビルド: 0 正常終了、1 失敗、0 更新不要、0 スキップ ==========


以上です。
よろしくお願いします。

Re: 4.「キャラを描画してみよう」のところなのですが・・・

Posted: 2012年8月28日(火) 15:38
by softya(ソフト屋)
1章のプロジェクトと素材を用意しよう。で間違っていなければ出ないはずのエラーですね。

これはch_tが見つからないというエラーですので、struct.hが見えていないと言うことはdefine.hかGV.hが間違っているということになります。

Re: 4.「キャラを描画してみよう」のところなのですが・・・

Posted: 2012年8月28日(火) 15:47
by mi_l
1章のプロジェクトと素材を用意しよう.ではダウンロードとDXライブラリの初期設定だけですよね・・・

それと、キャラを描画してみようの段階ではdefine.hやGV.hは手をつけませんよね?

Re: 4.「キャラを描画してみよう」のところなのですが・・・

Posted: 2012年8月28日(火) 15:53
by softya(ソフト屋)
mi_l さんが書きました:1章のプロジェクトと素材を用意しよう.ではダウンロードとDXライブラリの初期設定だけですよね・・・

それと、キャラを描画してみようの段階ではdefine.hやGV.hは手をつけませんよね?
そうですがエラーを見る限りは何か問題が有るとしか思えません。
ちなみに
GV.h

コード:

#include "../../../include/DxLib.h"
#include "define.h"
define.h

コード:

#include "struct.h"
となっていれば正しいです。

Re: 4.「キャラを描画してみよう」のところなのですが・・・

Posted: 2012年8月28日(火) 16:06
by mi_l
すみません・・そこが間違ってました・・・・

しかし、あと少しでまた新たなエラーがでました・・・

graph.cppです

コード:

#include "../include/GV.h"
#include "DxLib.h"

extern ch_t ch;
extern int img_ch[2][12];

void graph_ch(){
        DrawRotaGraphF(ch.x,ch.y,1.0f,0.0f,img_ch[0][ch.img],TRUE);
}

void graph_main(){
        graph_ch();
}
構造体とかは前と同じです、これも同じですが・・・

1>------ ビルド開始: プロジェクト: RyuJin, 構成: Debug Win32 ------
1> main.cpp
1> graph.cpp
1>c:\users\******\downloads\dx\project\1章\mydat\source\graph.cpp(8): warning C4244: '引数' : 'double' から 'float' への変換です。データが失われる可能性があります。
1>c:\users\********\downloads\dx\project\1章\mydat\source\graph.cpp(8): warning C4244: '引数' : 'double' から 'float' への変換です。データが失われる可能性があります。
1> コードを生成中...
1> コンパイル中...
1> shotH.cpp
1> shot.cpp
1> out.cpp
1> music.cpp
1> load.cpp
1> key.cpp
1> ini.cpp
1> graph_back.cpp
1> fps.cpp
1> enemy_act_pattern.cpp
1> enemy.cpp
1> cshot.cpp
1> char.cpp
1> boss_shotH.cpp
1> boss_shot.cpp
1> コードを生成中...
このあとにわけのわからない外部シンボルがどーだとかかなり長いメッセージが・・・

graph.cppの直し方だけ教えてください、
お願いします。

Re: 4.「キャラを描画してみよう」のところなのですが・・・

Posted: 2012年8月28日(火) 16:13
by softya(ソフト屋)
warning C4244はエラーではありません。
メッセージに書かれた通り精度の高い型から低い型への型変換でデータの一部が失われる可能性があると言う警告で、この場合は狙い通りなので問題ありません。
なのでエラーは別件だと思います。

Re: 4.「キャラを描画してみよう」のところなのですが・・・

Posted: 2012年8月28日(火) 16:17
by mi_l
エラーを載せます・・・かなり長いです・・


1>------ ビルド開始: プロジェクト: RyuJin, 構成: Debug Win32 ------
1> boss_shot.cpp
1> コードを生成中...
1> コンパイル中...
1> shotH.cpp
1> shot.cpp
1> out.cpp
1> music.cpp
1> main.cpp
1> load.cpp
1> key.cpp
1> ini.cpp
1> graph_back.cpp
1> graph.cpp
1>c:\users\ryutaishiduka\downloads\dx\project\1章\mydat\source\graph.cpp(8): warning C4244: '引数' : 'double' から 'float' への変換です。データが失われる可能性があります。
1>c:\users\ryutaishiduka\downloads\dx\project\1章\mydat\source\graph.cpp(8): warning C4244: '引数' : 'double' から 'float' への変換です。データが失われる可能性があります。
1> fps.cpp
1> enemy_act_pattern.cpp
1> enemy.cpp
1> cshot.cpp
1> char.cpp
1> boss_shotH.cpp
1> コードを生成中...
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "public: __thiscall D_btDiscreteDynamicsWorld::D_btDiscreteDynamicsWorld(class D_btDispatcher *,class D_btBroadphaseInterface *,class D_btConstraintSolver *,class D_btCollisionConfiguration *)" (??0D_btDiscreteDynamicsWorld@@QAE@PAVD_btDispatcher@@PAVD_btBroadphaseInterface@@PAVD_btConstraintSolver@@PAVD_btCollisionConfiguration@@@Z) が関数 "int __cdecl DxLib::BulletPhysics_Initialize(struct DxLib::BULLET_PHYSICS *,struct DxLib::tagVECTOR)" (?BulletPhysics_Initialize@DxLib@@YAHPAUBULLET_PHYSICS@1@UtagVECTOR@1@@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "public: __thiscall D_btSequentialImpulseConstraintSolver::D_btSequentialImpulseConstraintSolver(void)" (??0D_btSequentialImpulseConstraintSolver@@QAE@XZ) が関数 "int __cdecl DxLib::BulletPhysics_Initialize(struct DxLib::BULLET_PHYSICS *,struct DxLib::tagVECTOR)" (?BulletPhysics_Initialize@DxLib@@YAHPAUBULLET_PHYSICS@1@UtagVECTOR@1@@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "public: __thiscall D_btAxisSweep3::D_btAxisSweep3(class D_btVector3 const &,class D_btVector3 const &,unsigned short,class D_btOverlappingPairCache *,bool)" (??0D_btAxisSweep3@@QAE@ABVD_btVector3@@0GPAVD_btOverlappingPairCache@@_N@Z) が関数 "int __cdecl DxLib::BulletPhysics_Initialize(struct DxLib::BULLET_PHYSICS *,struct DxLib::tagVECTOR)" (?BulletPhysics_Initialize@DxLib@@YAHPAUBULLET_PHYSICS@1@UtagVECTOR@1@@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "void * __cdecl D_btAlignedAllocInternal(unsigned int,int)" (?D_btAlignedAllocInternal@@YAPAXIH@Z) が関数 "int __cdecl DxLib::BulletPhysics_Initialize(struct DxLib::BULLET_PHYSICS *,struct DxLib::tagVECTOR)" (?BulletPhysics_Initialize@DxLib@@YAHPAUBULLET_PHYSICS@1@UtagVECTOR@1@@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "public: __thiscall D_btCollisionDispatcher::D_btCollisionDispatcher(class D_btCollisionConfiguration *)" (??0D_btCollisionDispatcher@@QAE@PAVD_btCollisionConfiguration@@@Z) が関数 "int __cdecl DxLib::BulletPhysics_Initialize(struct DxLib::BULLET_PHYSICS *,struct DxLib::tagVECTOR)" (?BulletPhysics_Initialize@DxLib@@YAHPAUBULLET_PHYSICS@1@UtagVECTOR@1@@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "public: __thiscall D_btDefaultCollisionConfiguration::D_btDefaultCollisionConfiguration(struct D_btDefaultCollisionConstructionInfo const &)" (??0D_btDefaultCollisionConfiguration@@QAE@ABUD_btDefaultCollisionConstructionInfo@@@Z) が関数 "int __cdecl DxLib::BulletPhysics_Initialize(struct DxLib::BULLET_PHYSICS *,struct DxLib::tagVECTOR)" (?BulletPhysics_Initialize@DxLib@@YAHPAUBULLET_PHYSICS@1@UtagVECTOR@1@@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2001: 外部シンボル ""public: virtual void __thiscall D_btBoxShape::calculateLocalInertia(float,class D_btVector3 &)const " (?calculateLocalInertia@D_btBoxShape@@UBEXMAAVD_btVector3@@@Z)" は未解決です。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2001: 外部シンボル ""public: virtual void __thiscall D_btBoxShape::getAabb(class D_btTransform const &,class D_btVector3 &,class D_btVector3 &)const " (?getAabb@D_btBoxShape@@UBEXABVD_btTransform@@AAVD_btVector3@@1@Z)" は未解決です。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2001: 外部シンボル ""public: virtual void __thiscall D_btConvexInternalShape::getAabbSlow(class D_btTransform const &,class D_btVector3 &,class D_btVector3 &)const " (?getAabbSlow@D_btConvexInternalShape@@UBEXABVD_btTransform@@AAVD_btVector3@@1@Z)" は未解決です。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2001: 外部シンボル ""public: virtual void __thiscall D_btSphereShape::batchedUnitVectorGetSupportingVertexWithoutMargin(class D_btVector3 const *,class D_btVector3 *,int)const " (?batchedUnitVectorGetSupportingVertexWithoutMargin@D_btSphereShape@@UBEXPBVD_btVector3@@PAV2@H@Z)" は未解決です。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2001: 外部シンボル ""public: virtual class D_btVector3 __thiscall D_btSphereShape::localGetSupportingVertexWithoutMargin(class D_btVector3 const &)const " (?localGetSupportingVertexWithoutMargin@D_btSphereShape@@UBE?AVD_btVector3@@ABV2@@Z)" は未解決です。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2001: 外部シンボル ""public: virtual class D_btVector3 __thiscall D_btSphereShape::localGetSupportingVertex(class D_btVector3 const &)const " (?localGetSupportingVertex@D_btSphereShape@@UBE?AVD_btVector3@@ABV2@@Z)" は未解決です。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2001: 外部シンボル ""public: virtual void __thiscall D_btSphereShape::calculateLocalInertia(float,class D_btVector3 &)const " (?calculateLocalInertia@D_btSphereShape@@UBEXMAAVD_btVector3@@@Z)" は未解決です。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2001: 外部シンボル ""public: virtual void __thiscall D_btConvexInternalShape::setLocalScaling(class D_btVector3 const &)" (?setLocalScaling@D_btConvexInternalShape@@UAEXABVD_btVector3@@@Z)" は未解決です。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2001: 外部シンボル ""public: virtual float __thiscall D_btCollisionShape::getContactBreakingThreshold(void)const " (?getContactBreakingThreshold@D_btCollisionShape@@UBEMXZ)" は未解決です。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2001: 外部シンボル ""public: virtual float __thiscall D_btCollisionShape::getAngularMotionDisc(void)const " (?getAngularMotionDisc@D_btCollisionShape@@UBEMXZ)" は未解決です。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2001: 外部シンボル ""public: virtual void __thiscall D_btCollisionShape::getBoundingSphere(class D_btVector3 &,float &)const " (?getBoundingSphere@D_btCollisionShape@@UBEXAAVD_btVector3@@AAM@Z)" は未解決です。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2001: 外部シンボル ""public: virtual void __thiscall D_btSphereShape::getAabb(class D_btTransform const &,class D_btVector3 &,class D_btVector3 &)const " (?getAabb@D_btSphereShape@@UBEXABVD_btTransform@@AAVD_btVector3@@1@Z)" は未解決です。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "public: void __thiscall D_btCollisionObject::setActivationState(int)" (?setActivationState@D_btCollisionObject@@QAEXH@Z) が関数 "int __cdecl DxLib::BulletPhysics_SetupRigidBody(struct DxLib::BULLET_PHYSICS *,struct DxLib::BULLET_RIGIDBODY_INFO *,struct DxLib::BULLET_RIGIDBODY_SETUP_INFO *)" (?BulletPhysics_SetupRigidBody@DxLib@@YAHPAUBULLET_PHYSICS@1@PAUBULLET_RIGIDBODY_INFO@1@PAUBULLET_RIGIDBODY_SETUP_INFO@1@@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "public: __thiscall D_btRigidBody::D_btRigidBody(struct D_btRigidBody::D_btRigidBodyConstructionInfo const &)" (??0D_btRigidBody@@QAE@ABUD_btRigidBodyConstructionInfo@0@@Z) が関数 "int __cdecl DxLib::BulletPhysics_SetupRigidBody(struct DxLib::BULLET_PHYSICS *,struct DxLib::BULLET_RIGIDBODY_INFO *,struct DxLib::BULLET_RIGIDBODY_SETUP_INFO *)" (?BulletPhysics_SetupRigidBody@DxLib@@YAHPAUBULLET_PHYSICS@1@PAUBULLET_RIGIDBODY_INFO@1@PAUBULLET_RIGIDBODY_SETUP_INFO@1@@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "protected: __thiscall D_btConvexInternalShape::D_btConvexInternalShape(void)" (??0D_btConvexInternalShape@@IAE@XZ) が関数 "int __cdecl DxLib::BulletPhysics_SetupRigidBody(struct DxLib::BULLET_PHYSICS *,struct DxLib::BULLET_RIGIDBODY_INFO *,struct DxLib::BULLET_RIGIDBODY_SETUP_INFO *)" (?BulletPhysics_SetupRigidBody@DxLib@@YAHPAUBULLET_PHYSICS@1@PAUBULLET_RIGIDBODY_INFO@1@PAUBULLET_RIGIDBODY_SETUP_INFO@1@@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "public: __thiscall D_btPolyhedralConvexShape::D_btPolyhedralConvexShape(void)" (??0D_btPolyhedralConvexShape@@QAE@XZ) が関数 "int __cdecl DxLib::BulletPhysics_SetupRigidBody(struct DxLib::BULLET_PHYSICS *,struct DxLib::BULLET_RIGIDBODY_INFO *,struct DxLib::BULLET_RIGIDBODY_SETUP_INFO *)" (?BulletPhysics_SetupRigidBody@DxLib@@YAHPAUBULLET_PHYSICS@1@PAUBULLET_RIGIDBODY_INFO@1@PAUBULLET_RIGIDBODY_SETUP_INFO@1@@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "public: __thiscall D_btCapsuleShape::D_btCapsuleShape(float,float)" (??0D_btCapsuleShape@@QAE@MM@Z) が関数 "int __cdecl DxLib::BulletPhysics_SetupRigidBody(struct DxLib::BULLET_PHYSICS *,struct DxLib::BULLET_RIGIDBODY_INFO *,struct DxLib::BULLET_RIGIDBODY_SETUP_INFO *)" (?BulletPhysics_SetupRigidBody@DxLib@@YAHPAUBULLET_PHYSICS@1@PAUBULLET_RIGIDBODY_INFO@1@PAUBULLET_RIGIDBODY_SETUP_INFO@1@@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "void __cdecl D_btAlignedFreeInternal(void *)" (?D_btAlignedFreeInternal@@YAXPAX@Z) が関数 "public: static void __cdecl D_btCollisionObject::operator delete(void *)" (??3D_btCollisionObject@@SAXPAX@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2001: 外部シンボル ""public: virtual class D_btVector3 __thiscall D_btConvexInternalShape::localGetSupportingVertex(class D_btVector3 const &)const " (?localGetSupportingVertex@D_btConvexInternalShape@@UBE?AVD_btVector3@@ABV2@@Z)" は未解決です。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "public: virtual __thiscall D_btConvexShape::~D_btConvexShape(void)" (??1D_btConvexShape@@UAE@XZ) が関数 "public: virtual __thiscall D_btPolyhedralConvexShape::~D_btPolyhedralConvexShape(void)" (??1D_btPolyhedralConvexShape@@UAE@XZ) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "public: void __thiscall D_btGeneric6DofSpringConstraint::setEquilibriumPoint(void)" (?setEquilibriumPoint@D_btGeneric6DofSpringConstraint@@QAEXXZ) が関数 "int __cdecl DxLib::BulletPhysics_SetupJoint(struct DxLib::BULLET_PHYSICS *,struct DxLib::BULLET_JOINT_INFO *,struct DxLib::BULLET_JOINT_SETUP_INFO *)" (?BulletPhysics_SetupJoint@DxLib@@YAHPAUBULLET_PHYSICS@1@PAUBULLET_JOINT_INFO@1@PAUBULLET_JOINT_SETUP_INFO@1@@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "public: void __thiscall D_btGeneric6DofConstraint::calculateTransforms(void)" (?calculateTransforms@D_btGeneric6DofConstraint@@QAEXXZ) が関数 "int __cdecl DxLib::BulletPhysics_SetupJoint(struct DxLib::BULLET_PHYSICS *,struct DxLib::BULLET_JOINT_INFO *,struct DxLib::BULLET_JOINT_SETUP_INFO *)" (?BulletPhysics_SetupJoint@DxLib@@YAHPAUBULLET_PHYSICS@1@PAUBULLET_JOINT_INFO@1@PAUBULLET_JOINT_SETUP_INFO@1@@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "public: void __thiscall D_btGeneric6DofSpringConstraint::setStiffness(int,float)" (?setStiffness@D_btGeneric6DofSpringConstraint@@QAEXHM@Z) が関数 "int __cdecl DxLib::BulletPhysics_SetupJoint(struct DxLib::BULLET_PHYSICS *,struct DxLib::BULLET_JOINT_INFO *,struct DxLib::BULLET_JOINT_SETUP_INFO *)" (?BulletPhysics_SetupJoint@DxLib@@YAHPAUBULLET_PHYSICS@1@PAUBULLET_JOINT_INFO@1@PAUBULLET_JOINT_SETUP_INFO@1@@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "public: void __thiscall D_btGeneric6DofSpringConstraint::enableSpring(int,bool)" (?enableSpring@D_btGeneric6DofSpringConstraint@@QAEXH_N@Z) が関数 "int __cdecl DxLib::BulletPhysics_SetupJoint(struct DxLib::BULLET_PHYSICS *,struct DxLib::BULLET_JOINT_INFO *,struct DxLib::BULLET_JOINT_SETUP_INFO *)" (?BulletPhysics_SetupJoint@DxLib@@YAHPAUBULLET_PHYSICS@1@PAUBULLET_JOINT_INFO@1@PAUBULLET_JOINT_SETUP_INFO@1@@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "public: __thiscall D_btGeneric6DofSpringConstraint::D_btGeneric6DofSpringConstraint(class D_btRigidBody &,class D_btRigidBody &,class D_btTransform const &,class D_btTransform const &,bool)" (??0D_btGeneric6DofSpringConstraint@@QAE@AAVD_btRigidBody@@0ABVD_btTransform@@1_N@Z) が関数 "int __cdecl DxLib::BulletPhysics_SetupJoint(struct DxLib::BULLET_PHYSICS *,struct DxLib::BULLET_JOINT_INFO *,struct DxLib::BULLET_JOINT_SETUP_INFO *)" (?BulletPhysics_SetupJoint@DxLib@@YAHPAUBULLET_PHYSICS@1@PAUBULLET_JOINT_INFO@1@PAUBULLET_JOINT_SETUP_INFO@1@@Z) で参照されました。
1>DxUseCLib_d.lib(DxUseCLibPhysics.obj) : error LNK2019: 未解決の外部シンボル "public: void __thiscall D_btRigidBody::setCenterOfMassTransform(class D_btTransform const &)" (?setCenterOfMassTransform@D_btRigidBody@@QAEXABVD_btTransform@@@Z) が関数 "int __cdecl DxLib::BulleyPhysics_ResetRigidBody(struct DxLib::BULLET_RIGIDBODY_INFO *,struct DxLib::tagVECTOR)" (?BulleyPhysics_ResetRigidBody@DxLib@@YAHPAUBULLET_RIGIDBODY_INFO@1@UtagVECTOR@1@@Z) で参照されました。
1>C:\Users\ryutaishiduka\Downloads\Dx\project\1章\Debug\RyuJin.exe : fatal error LNK1120: 外部参照 32 が未解決です。
========== ビルド: 0 正常終了、1 失敗、0 更新不要、0 スキップ ==========

なにかわかるでしょうか?

Re: 4.「キャラを描画してみよう」のところなのですが・・・

Posted: 2012年8月28日(火) 16:22
by softya(ソフト屋)
DXライブラリの部分でエラーが出ている様です。
3章までは無事コンパイルリンク出来ていたら出ないエラーなのですが。

3章もダメなら、もう一度ダウンロードして別の場所に解凍して1章からやり直してみてください。

Re: 4.「キャラを描画してみよう」のところなのですが・・・

Posted: 2012年8月29日(水) 20:17
by Dixq (管理人)
全ての章のプログラムはプロジェクトファイル付で配布しています。
そちらと、手元のソースコードを比較してみてはいかがでしょうか。
比較にはWinMergeというソフトが便利です。
http://www.geocities.co.jp/SiliconValle ... merge.html
これでソースコードを比較すれば配布しているものとどこが違うのかわかると思います。

Re: 4.「キャラを描画してみよう」のところなのですが・・・

Posted: 2012年8月31日(金) 16:48
by mi_l
ありがとうございます!!