Archived

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

Why do I get this error ?

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

When I try to compile my freak out example I get this error : c:\program files\microsoft visual studio\myprojects\darek1\blackbox.h(34) : error C2146: syntax error : missing '';'' before identifier ''lpdd'' c:\program files\microsoft visual studio\myprojects\darek1\blackbox.h(34) : fatal error C1004: unexpected end of file found Freakout.cpp c:\program files\microsoft visual studio\myprojects\darek1\blackbox.h(34) : error C2146: syntax error : missing '';'' before identifier ''lpdd'' c:\program files\microsoft visual studio\myprojects\darek1\blackbox.h(34) : fatal error C1004: unexpected end of file found I hope someone will have the answer.

Share this post


Link to post
Share on other sites
well, i think its your header files are missing the include statements

you have to include the directx header for the interface you are using.


    
#include<ddraw.h>


or it could be no stdafx, missing semi-colon or even a missing brace.

post your code

[edited by - jwalker on August 26, 2002 3:06:56 AM]

Share this post


Link to post
Share on other sites
It could also mean that one of the lines above your declaration of lpdd is missing a semi-colon. If you have any custome header files included (and the above answer isn''t the problem) then make sure all of your function/class declarations end with a semi-colon.

Share this post


Link to post
Share on other sites
Thank you for your help.
Unfortunately I do have #include <ddraw.h> in header file
and I don''t miss any semi-colon.
I suspect I didn''t add my drectx lib files to linker and I don''t know how to do it.
can you tell me ?

Share this post


Link to post
Share on other sites
It''s probably the order in which you include the file. Is ddraw.h (or d3d8.h) included before blackbox.h? It wouldn''t be a linker error - those would show undefined function errors (with the word link to the left of the message). To add to the link files, in Visual C/C++ 6.x, goto Projects, Settings, Link Tab - Objects/Library Modules text box - add your link files there.

*** 500 x 1


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

Share this post


Link to post
Share on other sites
Somewhere before line 34 in blackbox.h you''re missing a semicolor. Check each line starting at 34 and moving backwards. Perhaps at the end of a class declaraction. If you post blackbox.h, it might help.

tj963

Share this post


Link to post
Share on other sites