• Advertisement

Archived

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

DirectX Binary EXE Compatibility

This topic is 6552 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 everyone, I have a major problem with a project that I am doing with a friend of mine you might has seen them around on here, those and HAK, well, what we are doing is creating a small demo based on Space Invaders, just something simple, so that we can show off and put it on our Demo disks for people to look at. But I am getting some odd problems. The program is compiled with MSVC6++ with DirectX 7 SDK, it''s pretty standard stuff, with nothing special being used. But what I am finding is that DirectX applications are not necessarily compatible across machines. What I mean by this is that I compile and run the application here locally without any problems and get the desired results. But my friend Ronnie smith, cannot run this exe, he says that the app opens, then goes black and returns to windows ? Same with my friend Rob, he had the same effect. But since he had the MSVC5++ compiler, I send him the code, he compiled and it ran ok, no problems ?? why ? the code had not changed ? so I can only assume that my version was using DirectX in a way that my machine was capable of displaying, but his was not ? Does anyone else have this problem ? It would be beneficial to me to understand why I can give someone an exe and they cannot run it, but when they compile it themselves, they can run it. thanks kosh

Share this post


Link to post
Share on other sites
Advertisement
First question, are you checking for init errors in DirectX? And are you reporting them? What it sounds like it happening is that you have a new version of directx on your system and your friends don''t have it yet. First try having them download the current version of DX7 off microsofts site. If it still doesn''t work, try adding code after each init statement looking for failed call. Try using this function. MessageBox(NULL, "some error message", "Error", MB_OK). Hopefully then you will be able to find the problem statement.

Share this post


Link to post
Share on other sites
hi

yes, we are doing that, but I am going to check to see if EVERY possible outcome has been reported, perhaps it''s a problem thats occuring with no corresponding error message, so we hope to eliminate that problem shortly

Also, in our code, we are using IDirectDrawSurface4 * so all version of DirectX above 6 should run this code ok. I cannot see an occurance in which my code would not be compatible with this.

But even if it does. How can you explain that my friend Rob could not run the exe I provided, but could run the exe once he had compiled it on his machine. Thats more of what I was trying to get an answer for, see if anyone else had this problem before.

Anyway, thanks for the idea, we are trying that out.

kosh

Share this post


Link to post
Share on other sites
I also had this problem when I forgot to:

SomeDXStruct DXStruct;
ZeroMemory (&DXStruct, sizeof (SomeDXSTruct));
DXStruct.dwSize = sizeof (SomeDXStruct);


Check these.


Share this post


Link to post
Share on other sites
Also when you compile and build your game are you setting it to debug or retail mode? A debug version may not run on a computer without the debug dll''s that you have on yours.

One person said that the games industry is "a transfer of funds from the rich to the lucky"

Share this post


Link to post
Share on other sites
AHHHHHHHHHH !!!!

thats it, I am handing out the debug version, I didnt know that you needed to run it on a machine with the dll''s on, thanks, that solves a major problem.

Right, so now, to try compiling it at release and sending that out thanks mate, saved my bacon

Share this post


Link to post
Share on other sites
RIGHT !!!

I just tried that and it''s true, if you compile debug, dont expect it to work anywhere other than on your own personal machine.

Compile release to get it working on any and all machines

Thanks.

kosh

Share this post


Link to post
Share on other sites
Not to mention that the exe file is Way smaller and therefore faster to send over the net. Kills two birds with one stone.

One person said that the games industry is "a transfer of funds from the rich to the lucky"

Share this post


Link to post
Share on other sites
You can''t rely on a release program working on the target machine, either - it''s just that much more likely that the DLLs will be present.

I suggest statically linking - the executable size will go up, but you won''t have to worry about DLL versions, whether that be C runtime, or MFC.

TheTwistedOne
http://www.angrycake.com

Share this post


Link to post
Share on other sites
It wouldn''t be possible to statically link a DX program, would it? The drivers on every computer would be different, you would have to go through a DLL.

Jonathan

Share this post


Link to post
Share on other sites
hello all,

statically linking ? no, I dont think I''ll try that, it doesnt matter for small exe''s but when your project goes up in size, wow, it''ll get huge very quickly.

basically, you can pretty much depend on DX for dlls to be where they should, if you can''t I suggest we start a thread on this and rally up support asking Microsoft why not?

What DX has is a COM based system for working out version of directx (if i''m wrong please correct me), so if I have DX6, I can use the IDirectDrawSurface4 interface, but I cannot use IDirectDrawSurface7 interface, so if I try and run anything using the 7 interface on DX6, it''ll fail, but if I run anything with the 4 interface on DX6, it''ll be ok.

So it''s really about interfaces, not about version of directx, but also, even though each version of the interface supports the lower ones, there is talk on this board that they do not in fact extend the class with new information (the way I would have done it, why didnt they by the way, any good reason ?) they actually duplicate the given information in a completely separate interface. Why?? dont know, please tell me.

Cee ya

kosh

Share this post


Link to post
Share on other sites

  • Advertisement