#### Archived

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

# Why do I get this error ?

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

## 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 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.

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

##### 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 on other sites
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 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

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

##### 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

1. 1
2. 2
3. 3
4. 4
5. 5
Rutin
15

• 14
• 9
• 9
• 9
• 10
• ### Forum Statistics

• Total Topics
632912
• Total Posts
3009198
• ### Who's Online (See full list)

There are no registered users currently online

×