fatal error LNK1136: invalid or corrupt file
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
Hi,
I might be missing something, but you probably shouldn''t be linking with ddraw.h... Try ddraw.lib
Hope this helps,
-ns-
I might be missing something, but you probably shouldn''t be linking with ddraw.h... Try ddraw.lib
Hope this helps,
-ns-
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
#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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement