Archived

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

fatal error LNK1136: invalid or corrupt file

This topic is 6033 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

Hello, When I compile a program, I receive the following error: Linking... ddraw.h : fatal error LNK1136: invalid or corrupt file Error executing link.exe. I reinstalled the directx8 SDK but that didn’t help me. How would I fix this problem? Please don''t think that I am dumb because I am only 15 years old and I just started to program in directX. Thank You for your help

Share this post


Link to post
Share on other sites
Yeah, that''s the problem. You include header files in your code with the #include<> statement, and you include library files in the project link settings. There''s an alternate way to do it in code:

#pragma comment("lib", "ddraw.lib")

Also, if you''re using dx8, make sure you add a define before you do includes so it knows you''re using directdraw--I''m not positive, but I think you have to add this line:

#define DIRECTDRAW_VERSION 0x0700

if you''re using DirectDraw 7 functions. Hope that helps.
--


WNDCLASSEX Reality;
...
...
Reality.lpfnWndProc=ComputerGames;
...
...
RegisterClassEx(&Reality);


Unable to register Reality...what''s wrong?
---------
Dan Upton
Lead Designer
WolfHeart Software

Share this post


Link to post
Share on other sites