Archived

This topic is now archived and is closed to further replies.

Paladin__

Programming RPG book question

Recommended Posts

I have included the core_system, core_graphics and core_global files in my project and inherited the cApplication with my class called CApp as stated in the book. In the core_global file, I have commented out the headers and things i''m not using, but when I compile, I get a few linking errors. I added d3d8.lib and d3dx8.lib to the linking tab and verified that my DirectX includes and lib files are pointing to the proper directory. I also copied the DirectX 8.1 updates from home.att.net/~rpgbook to the game core folder overwriting the ones that referred to DirectX 8.0. Is there anything that I could try or is there anything I missed? Thanks for any help. I''m excited about this book and I''m finally to where I can start using the core libraries that came with the book, but I have to get it to compile first . Paladin

Share this post


Link to post
Share on other sites
I''m kinda a beginner myself and i''m horrible when it comes to .lib and .h thingies, hehe. I have it working though after I included all the .lib in the project settings. I think there are like 20 directx .lib files, hehe.

Share this post


Link to post
Share on other sites
Actually, I was in the same situation as you are Paladin__
However, I got almost everything working now except the
D3DX intersect function but that should be easily fixed
with Jim''s remedy at http://home.att.net/~rpgbook/fixes.htm
- just haven''t gotten down to actually trying it yet.

_________________
Best regards,
Sherman Chin
www.Sherman3D.com

Share this post


Link to post
Share on other sites
Like a dummy, I left for work without posting the link errors. I do know they are not to any obvious library, but I will post the error output as soon as I get home.

@sherman, I downloaded the updates at Mr. Adams site, but I seem to be missing some library(s).

I''m just using his System, Graphics and the global header file now. I was going to try and make a simple window and try some simple graphics.

I linked in d3d8.lib, d3dx8.lib. I was going to try a few other libs when I got home, but I know it''s something simple I''m doing/not doing. I''ll post the error output asap.

Thanks for the replies.

Paladin

Share this post


Link to post
Share on other sites
quote:
Original post by Ahmed Saleh
i wander , why the core Sound doesnt works with me .



AFAIK the Sound core contains some problems. There''s bug -fixes and a new sound core at the book''s site. Check it out...

**************************
The best way to accelerate a Win9x machine is at 9.81m/s2

Share this post


Link to post
Share on other sites
I''m going to play with the code more tonight, but for now,
Here is my lovely error report:

Any Ideas?

Paladin

//report starts here
Deleting intermediate files and output files for project ''DaveTest - Win32 Debug''.
--------------------Configuration: DaveTest - Win32 Debug--------------------
Compiling...
Core_Graphics.cpp
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(20) : warning C4305: ''='' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(20) : warning C4309: ''='' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(222) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(222) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(222) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(222) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(222) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(222) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2387) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2387) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2387) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2387) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2387) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2387) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2388) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2388) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2388) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2388) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2388) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2388) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2389) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2389) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2389) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2389) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2389) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2389) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2508) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2508) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2508) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2508) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2508) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2508) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2509) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2509) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2509) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2509) : warning C4309: ''argument'' : truncation of constant value
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2509) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\_studies\rpg games in directx\chap10\davetest\core_graphics.cpp(2509) : warning C4309: ''argument'' : truncation of constant value
Core_System.cpp
WinMain.cpp
App.cpp
Linking...
Core_Graphics.obj : error LNK2001: unresolved external symbol _DirectXFileCreate@4
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationKey
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimation
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationSet
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMMesh
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMFrameTransformMatrix
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMFrame
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationOptions
Debug/DaveTest.exe : fatal error LNK1120: 8 unresolved externals
Error executing link.exe.

DaveTest.exe - 9 error(s), 38 warning(s)

Share this post


Link to post
Share on other sites
Dear Paladin__,

Are you sure you have the DirectX 8.1 SDK installed. I used
to have errors like yours because I only had the DirectX 8.0
SDK (although I had the DirectX 8.1 runtime). Anyway, the
only errors I am getting now are:

Core_Graphics.cpp
e:\dxsdk\include\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800
c:\s3d\gamecore\core_graphics.cpp(20) : warning C4305: ''='' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(20) : warning C4309: ''='' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(222) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(222) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(222) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(222) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(222) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(222) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(1124) : error C2660: ''UpdateSkinnedMesh'' : function does not take 2 parameters
c:\s3d\gamecore\core_graphics.cpp(1280) : error C2660: ''GenerateSkinnedMesh'' : function does not take 5 parameters
c:\s3d\gamecore\core_graphics.cpp(1788) : error C2660: ''UpdateSkinnedMesh'' : function does not take 2 parameters
c:\s3d\gamecore\core_graphics.cpp(2386) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(2386) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(2386) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(2386) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(2386) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(2386) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(2387) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(2387) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(2387) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(2387) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(2387) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(2387) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(2388) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(2388) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(2388) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(2388) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(2388) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(2388) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(2507) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(2507) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(2507) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(2507) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(2507) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(2507) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(2508) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(2508) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(2508) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(2508) : warning C4309: ''argument'' : truncation of constant value
c:\s3d\gamecore\core_graphics.cpp(2508) : warning C4305: ''argument'' : truncation from ''const int'' to ''char''
c:\s3d\gamecore\core_graphics.cpp(2508) : warning C4309: ''argument'' : truncation of constant value
Core_Network.cpp
e:\dxsdk\include\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800
c:\s3d\gamecore\core_network.cpp(42) : error C2065: ''DirectPlay8Create'' : undeclared identifier
c:\s3d\gamecore\core_network.cpp(192) : error C2065: ''DirectPlay8AddressCreate'' : undeclared identifier
WinMain.cpp
e:\dxsdk\include\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800
c:\s3d\s3dserverd3d\winmain.cpp(951) : error C2660: ''D3DXIntersect'' : function does not take 8 parameters
Error executing cl.exe.

S3DServer.exe - 6 error(s), 38 warning(s)

Looks like I have to define DIRECTINPUT_VERSION somewhere and
change those skinned mesh functions according to the errata
at Jim''s site. Wish he fixed the files in the update though
because I am just so lazy ^_~.



_________________
Best regards,
Sherman Chin
www.Sherman3D.com

Share this post


Link to post
Share on other sites
@Sherman, dont worry about the DirectInput stuff, it will just default to 8.0.

As for your other errors, the DirectPlay stuff changed some I think, so check his site for the updates to fix those errors.

I just finished the first DirectPlay chapter. You'll get a link error as well because some of the libraries don't exist anymore.

Anyway, I'm pretty sure I'm running DirectX 8.1 unless I installed the wrong SDK. If I find any other clues to my prob, I'll post them.

Why all the warnings though? Warnings never make me feel comfortable. Like I'm missing out on something .

Paladin

UPDATE: My Control Panel DirectX icon indicates that DirectX 8.1 IS installed. Something else is wrong.

[edited by - Paladin__ on July 17, 2002 11:35:35 PM]

Share this post


Link to post
Share on other sites
OK, now I think I can help:

1)

DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800

Paladin is right, it will default to the SDK version you have installed. However, to tell DirectX which version you are using, and get rid of that warning, then just #define DIRECTINPUT_VERSION 0x0800 before you #include <dinput.h>. You can actually do the same for DirectSound and Direct3D but only dinput.h (from version 8.1) contains the following:
#define DIRECTINPUT_HEADER_VERSION 0x0800
#ifndef DIRECTINPUT_VERSION
#define DIRECTINPUT_VERSION DIRECTINPUT_HEADER_VERSION
#pragma message(__FILE__ ": DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800")
#endif
DirectSound and Direct3D will use the default version without outputting a silly message!
You can use older versions of DirectInput by defining DIRECTINPUT_VERSION as 0x0300, or 0x0500, or 0x0700.

2)

warning C4305: 'argument' : truncation from 'const int' to 'char'

If you look at the code generating this error I think you will see that it stems from Jims use of char to store RGBA colour values. This makes sense, because an unsigned char variable can hold values of 0 to 255, and hopefully you are aware of the relevance! This is good for safety because if we were using shorts, longs, ints, etc, to store colour values we would constantly have to ensure that they were not greater than 255. In the good old days this was simple because typing char in most compilers AUTOMATICALLY expanded it to unsigned char (a signed char would be of no use to us because it holds values from -128 to 128). However, as Jim explains in Appendix A, Visual C/C++ does not automatically do this, and we have to tell it to.
-> Go to project settings, C/C++ tab.
-> Choose the general category.
-> In project options add /J to the end of the text.
If you are unsure of how to do this then go to page 992.

3)

error C2660: 'UpdateSkinnedMesh' : function does not take 2 parameters
error C2660: 'GenerateSkinnedMesh' : function does not take 5 parameters
error C2660: 'UpdateSkinnedMesh' : function does not take 2 parameters

See Jims site for explanations of this. Basically 8.1 has a few new parameters we must deal with, although I think you only have to pass NULL values.

4)

I'm not using DirectPlay but I suspect those problems are similar to 3, so look to Jims site for help.

5)

error LNK2001: unresolved external symbol _DirectXFileCreate@4
error LNK2001: unresolved external symbol _TID_D3DRMAnimationKey
error LNK2001: unresolved external symbol _TID_D3DRMAnimation
error LNK2001: unresolved external symbol _TID_D3DRMAnimationSet
error LNK2001: unresolved external symbol _TID_D3DRMMesh
error LNK2001: unresolved external symbol _TID_D3DRMFrameTransformMatrix
error LNK2001: unresolved external symbol _TID_D3DRMFrame
error LNK2001: unresolved external symbol _TID_D3DRMAnimationOptions

I'm not certain but I assume you have #include "rmxftmpl.h" and #include "rmxfguid.h" since these are linking errors and not undeclared identifiers. Do you have d3dxof.lib in your linking tab?

Hope this helped

----------------------------
I HATE COLLISION DETECTION!!

[edited by - pan narrans on July 18, 2002 6:39:14 AM]

Share this post


Link to post
Share on other sites
@pan narrans, I do see the relevance of the const int to char thing, but seeing so many warnings is just scary looking at the whole thing at once. After I did what you said with /P, that fixed those right up. The good thing is, I understand WHY I did it.

I didn't have d3dxof.lib in my lib links, but after I added it, I didn't see much change on my other problem. The two includes you mentioned are included in the core_graphics.cpp file. My output now is:

Compiling...
App.cpp
Core_Graphics.cpp
Core_System.cpp
WinMain.cpp
Linking...
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationKey
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimation
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationSet
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMMesh
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMFrameTransformMatrix
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMFrame
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationOptions
Debug/DaveTest.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.

DaveTest.exe - 8 error(s), 0 warning(s)

My code is pretty simple, so I'll post a few here. I have a class and a Winmain I've created, so I'm going to assume that Mr. Adams files are correct.

Here's the modified core_global.h:
#ifndef _CORE_GLOBAL_H_
#define _CORE_GLOBAL_H_

// Windows includes
#include <windows.h>

// Standard ANSI-C includes
#include <stdio.h>

// DirectX includes
#include "d3d8.h"
#include "d3dx8.h"

//#include "dmusici.h"
//#include "dsound.h"
//#include "dplay8.h"
//#include "dpaddr.h"
//#include "dinput.h"

// Core includes
#include "Core_System.h"
#include "Core_Graphics.h"
//#include "Core_Input.h"
//#include "Core_Sound.h"
//#include "Core_Network.h"

#endif

Here's my CApp header file:
#if !defined(AFX_APP_H__D01A7641_56CD_433E_9C3A_9912BAD03641__INCLUDED_)
#define AFX_APP_H__D01A7641_56CD_433E_9C3A_9912BAD03641__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Core_System.h"

class CApp : public cApplication
{
public:
CApp();
virtual ~CApp();
BOOL Init();
BOOL Shutdown();
BOOL Frame();

private:
char *m_Name;

};

#endif

Here's the CApp Source file:

#include "Core_Global.h"
#include "App.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CApp::CApp()
{
//initialize to default values
m_Name = NULL;

//set up style, position, width, and height
m_Style = WS_OVERLAPPEDWINDOW;
m_XPos = 100;
m_YPos = 20;
m_Width = 400;
m_Height = 400;

strcpy(m_Class, "NameClass");
strcpy(m_Caption, "Dave's Window.");
}

CApp::~CApp()
{

}

BOOL CApp::Init()
{
if((m_Name = new char[10]) == NULL)
strcpy(m_Name, "Dave Ashworth");
else
return false;
return true;
}

BOOL CApp::Shutdown()
{
delete m_Name;
m_Name = NULL;
return true;
}

BOOL CApp::Frame()
{
if(MessageBox(GethWnd(), m_Name, "Dis be my name:", MB_OKCANCEL) == IDCANCEL)
return false;
return true;
}

This is straight from the book, but the book doesn't cover what to include where in this section, so I thought I had it right, but obviously not . Each file compiles fine, so I'm either missing an include somewhere or a lib.

Sorry so much text. I'm just trying to be as descriptive as possible.

I feel like the episode of the Simpsons when Mr Smithers looks at a frozen Mr Burns and says, "We'll get you out of there Mr Burns, as soon as we find the cure for... 17 knife wounds in the back.." A doctor says, "Hey, we're down to 13...YAY!"

Anyway, that's MY latest and greatest.

Paladin



[edited by - Paladin__ on July 18, 2002 11:49:48 AM]

Share this post


Link to post
Share on other sites
Paladin___, you can check if you have the DirectX 8.1 SDK by
reading your readme.txt file in your DXSDK directory (or
whatever you have named your SDK directory). The file should
mention something about DirectX 8.1

_________________
Best regards,
Sherman Chin
www.Sherman3D.com

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Paladin!

I got probles like you got when I compiled my samples on C++Builder. He said that I have *.lib on wrong format (COFF when needs OMF). I converted libs and there was OK. LINKER ERRORS WAS THE SAME.
>>>>> EXCELL

Share this post


Link to post
Share on other sites
Weird, even though I uninstalled DirectX 8, I still have

c:\mssdk\lib around,

but I installed DirectX 8.1 in

c:\DXSDK. The library and include settings are pointed to c:\DXSDK. I won''t know till I get home tonight if that is DirectX 8.1 or not. I''m pretty sure it is, but I''ll check the readme.txt when I get there.

Share this post


Link to post
Share on other sites
pan narrans did a better job than I could Between writing my new book and playing DDR Konamix, I''ve managed to not visit the boards lately to see this thread

quote:

Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationKey
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimation
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationSet
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMMesh
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMFrameTransformMatrix
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMFrame
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationOptions
Debug/DaveTest.exe : fatal error LNK1120: 7 unresolved externals



You need to include "rmxfguid.h" before any of the cores.



Jim Adams
home.att.net/~rpgbook
Author, Programming Role-Playing Games with DirectX

Share this post


Link to post
Share on other sites
I know this is getting to be a long running thread for a simple problem, but I have to ask:

In Core_Graphics.cpp, the following files are included in this order:

#include "Core_Global.h"
#include "rmxftmpl.h"
#include "rmxfguid.h"

Is this incorrect?

If I switch the include order I get 102 errors, so I''m assuming the guid header file needs to be elsewhere as well?

I''m using:

Core_Global.h
Core_System.h (and cpp)
Core_Graphics.h (and cpp)

my files are:
CApp.h (and cpp)
Winmain.cpp

I''m going to play around and try to figure out why I''m getting the link errors. I do see that the errors reference objects in the guid file, but I''m trying to figure out who is expecting the definition. From the appearance of the error, it seems that Core_Graphics does, but if I move around the files, I still get the same error or the 102 error version.

I have taken out core_global.h and just manually included all the libraries for each file and still no luck.

BTW, my file reads Final Release of DirectX 8.1 in the proper DirectX directory.

Any takers?

p.s.

Link in my Project->Settings
d3d8.lib d3dx8.lib d3dx8dt.lib d3dx8d.lib d3dxof.lib

(I added a few extra to see if that was my problem)

Tools->Options->Directories point to my c:\DXSDK\lib and c:\DXSDK\include for the lib and include settings respectively.

The text file in that directory says i''m running DirectX 8.1.

Can''t think of any other information to tell you.

Paladin

Share this post


Link to post
Share on other sites
I''m almost certain I know the problem: you are missing dxguid.lib from the lib settings.

I removed it from my lib settings to test the theory and it gave me the errors you''ve got, so this should be it.

Let me know if it helps


----------------------------
I HATE COLLISION DETECTION!!

Share this post


Link to post
Share on other sites
Ok Pan, thanks man. I added a few libs from the SDK, but I never made it to dxguid.lib obviously.

For anyone else with this error, make sure the following DirectX libraries are included in your project if you are just using system and graphics core:

d3d8.lib
d3dx8.lib
d3dxof.lib
AND (thanks again Pan)
dxguid.lib

Paladin

p.s. maaaan, I hope all the problems I run into don''t take this long to fix.

Share this post


Link to post
Share on other sites
quote:
Original post by Jim Adams
pan narrans did a better job than I could Between writing my new book and playing DDR Konamix, I''ve managed to not visit the boards lately to see this thread

[quote]
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationKey
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimation
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationSet
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMMesh
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMFrameTransformMatrix
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMFrame
Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationOptions
Debug/DaveTest.exe : fatal error LNK1120: 7 unresolved externals



You need to include "rmxfguid.h" before any of the cores.



Jim Adams
home.att.net/~rpgbook
Author, Programming Role-Playing Games with DirectX


Dear Jim,

Somehow, I think the problem isn''t with including "rmxfguid.h"
because it is already included in Core_global.cpp:
#include "Core_Global.h"
#include "rmxftmpl.h"
#include "rmxfguid.h"

Remember, I had the same problem last time too and I posted
on this board asking you how I should solve it. You told me to
include "rmxfguid.h" and I did in almost every other file I
can think of but that didn''t solve the problem. The problem
went away when I realized that I was still using the DirectX
8.0 SDK although I had the DirectX 8.1 runtime installed. Funny
that it isn''t working for Paladin__ though ;_;



_________________
Best regards,
Sherman Chin
www.Sherman3D.com

Share this post


Link to post
Share on other sites
Paladin__, great to hear that you have solved your problem by linking with dxguid.lib Funny, but I remember having your
problem even when I had dxguid.lib in there. Now, I am
off to fix that intersect function ^_^. It''s motivating to
have others working on the same code ^_^.

_________________
Best regards,
Sherman Chin
www.Sherman3D.com

Share this post


Link to post
Share on other sites
Okay, I finally got down to correcting the functions manually
and now Chapter 19''s demo compiles fine. However, when it runs,
I get the message, "Unable to host network server."

...oh wait a minute! It works fine now that I am on the
Internet. It is hosting with my ISP assigned IP. Hmm, how
do I get it to host properly on my local area network then?
I traced the problem down to the function:
if(m_Server.Host(m_guidAdapter, 9123, \
"RPGGAME", NULL, MAX_PLAYERS) == FALSE)
return FALSE;

Thanks ^_^

_________________
Best regards,
Sherman Chin
www.Sherman3D.com

Share this post


Link to post
Share on other sites
Oh boy, and now collision detection doesn''t seem to be working
anymore ;_; I can walk through the mountains and all. Looks
like the modification to D3DXIntersect is at fault:
D3DXIntersect(MeshPtr->m_Mesh, \
&D3DXVECTOR3(XStart,YStart,ZStart), &vecDir, \
&Hit, &FaceIndex, &u, &v, &Dist, NULL, NULL);
Anybody knows a fix to it?

Oh, I am using WinXP if that has anything to do with the
previous LAN hosting problem.

Thanks ^_^.

_________________
Best regards,
Sherman Chin
www.Sherman3D.com

Share this post


Link to post
Share on other sites