Sign in to follow this  

testapp

This topic is 4247 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi I wanted a simple as possible file to explain how to load a animated mesh and found this one here, unless you know of a simpler one, does anyone know why it won't compile. I have included the mfc classes it uses in the include directory http://www.gamedev.net/reference/articles/article2079.asp animation with directx .x files (gamedev article2079.asp) // File: "Main.cpp" // // Author: Jason Jurecka // // Creation Date: June 5, 2003 It gets error like 'CAllocateHierarchy cannot instantiate abstract class Unless it can be easily fixed, does anyone know of another simple animated mesh to learn how to? [Edited by - jagguy on May 31, 2006 4:59:39 AM]

Share this post


Link to post
Share on other sites
Don't know of another sample, and haven't seen this one before, but I wanted to comment that adding a link to the sample would be helpful for people who think of helping you. The more work someone needs to do in order to get a clue of what you're talking about, the less they're likely to help you.

Share this post


Link to post
Share on other sites
http://www.gamedev.net/reference/articles/article2079.asp

Share this post


Link to post
Share on other sites
The reason it won't compile is that the interface has changed just a little from the SDK it was originally compiled with.

I got it to compile, but it doesn't show anything when run. I don't have time to debug it now.

Share this post


Link to post
Share on other sites
Okay, I fixed the sample to compile with the latest SDK. It didn't show anything because I didn't load a model. :) I also fixed a minor buffer overrun. You can download it here.

Share this post


Link to post
Share on other sites
i dowloaded the file and loaded it dsw 'convert from vc++ 2003' then add the directx in linker options, the program fails to compile

zip..2079 file
c:\c++ downloads\xfile\cmodel.cpp(45) : error C2259: 'CAllocateHierarchy' : cannot instantiate

oir the other zip .dsw file has linker error mfc..lib. I didn't include this in diretories but I will check wit you first

Share this post


Link to post
Share on other sites
i dowloaded the file and loaded it dsw 'convert from vc++ 2003' then add the directx in linker options, the program fails to compile

zip..2079 file
c:\c++ downloads\xfile\cmodel.cpp(45) : error C2259: 'CAllocateHierarchy' : cannot instantiate

oir the other file has linker error mfc..lib. I didn't include this in diretories but I will check wit you first

Share this post


Link to post
Share on other sites
I just tried to convert the VS6 workspace into VS.NET 2003, and the program compiled fine. It may be that you're using a different SDK, that's not compatible with either the one the original sample compiled with or the one I use. I'm using the April 2006 SDK (the latest). What are you using?

On the other hand I don't understand how you're getting a linker error if you don't manage to compile.

Share this post


Link to post
Share on other sites
Quote:
Original post by ET3D
I just tried to convert the VS6 workspace into VS.NET 2003, and the program compiled fine. It may be that you're using a different SDK, that's not compatible with either the one the original sample compiled with or the one I use. I'm using the April 2006 SDK (the latest). What are you using?

On the other hand I don't understand how you're getting a linker error if you don't manage to compile.


i am using the April 2006 SDK (the latest). You had 2 zip files, I take it the one you modified was the ..2079 one(I tried both). I added the directx files in the properties and thats all I did.

if you got it to work then there must be some simple thing i am doing wrong

Share this post


Link to post
Share on other sites
No, I didn't modify the GameDev.net article. I have no access to that. Use the link in my reply to download the zip file. It's called XAnimation.zip.

Share this post


Link to post
Share on other sites
Quote:
Original post by ET3D
No, I didn't modify the GameDev.net article. I have no access to that. Use the link in my reply to download the zip file. It's called XAnimation.zip.


with your file I get and it is coded in vc6++ so maybe you didn't upload the correct file.

i get
LINK : fatal error LNK1104: cannot open file 'mfc42d.lib'

Share this post


Link to post
Share on other sites
I kept the VS 6 project as is, and created a VS 2005 project. No VS.NET 2003 included, but on my system the VS 6 project loads fine in VS.NET 2003. Perhaps it's because I have the right lib. I'd suggest changing the MFC selection in the project. That should help. If that doesn't work, an alternative would be to create a new project and use the same source files. Perhaps you'll get a more suitable configuration for you.

Share this post


Link to post
Share on other sites
Quote:
Original post by ET3D
I kept the VS 6 project as is, and created a VS 2005 project. No VS.NET 2003 included, but on my system the VS 6 project loads fine in VS.NET 2003. Perhaps it's because I have the right lib. I'd suggest changing the MFC selection in the project. That should help. If that doesn't work, an alternative would be to create a new project and use the same source files. Perhaps you'll get a more suitable configuration for you.


hi

neither of those options worked and i don't believe the thing will compile in vs2005. I get more linker errors now than before.
I have used computers enough to know when it starts to look complicated from 1 system to another, then the chances are looking grim. Computers are complicated things which can baffle the best of us.

If it is to work it will have to be in 2005 vs as simply downloading an older copy with errors then expecting it to work in the next edition seems a little ambitious.

It would be good if it could work but I don't know enough about the mesh program to fiddle.

thanks anyway

Share this post


Link to post
Share on other sites
Quote:
Original post by jagguy
neither of those options worked and i don't believe the thing will compile in vs2005.

Have you tried?

Anyway, I'm sorry I wasn't able to help. I can only say that it works on my machine, and I don't think that my configuration is all that unusual (though I don't have both VS.NET 2003 and VS 2005 installed).

Share this post


Link to post
Share on other sites
Quote:
Original post by ET3D
Quote:
Original post by jagguy
neither of those options worked and i don't believe the thing will compile in vs2005.

Have you tried?

Anyway, I'm sorry I wasn't able to help. I can only say that it works on my machine, and I don't think that my configuration is all that unusual (though I don't have both VS.NET 2003 and VS 2005 installed).


yes i did try everything you said and it just isn't that simple by the looks of it. I haven't done anything to my configuration other than add sdk to directories.

the problem seems to be I am downloading a vc6++ file and this is really old and buggy.
maybe get someone else to try and see if they can get it work with 2005.
It could be something simple and then I could ask them what they did.

VS 2005 is free to download.

Share this post


Link to post
Share on other sites
Sign in to follow this