Skip to main content
gamedev.net
🔒 Locked

compiling problems

Started by kevlur 5 replies 750+ views
Original Post
kevlur
kevlur
Hi, im trying to compile a direct3d app but the compiler give me these errors that i dont understand: :\Programmi\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(29) : error C2144: syntax error : missing '';'' before type ''int'' C:\Programmi\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(29) : error C2501: ''d'' : missing storage-class or type specifiers C:\Programmi\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(29) : fatal error C1004: unexpected end of file found and the lines of tchar.h interested are: #ifdef __cplusplus extern "C" { #endif i dont understand... if anyone can help me... Thanks Kev
-silencer-
-silencer-
quote:
Original post by kevlur

:\Programmi\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(29) : error C2144: syntax error : missing '';'' before type ''int''
C:\Programmi\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(29) : error C2501: ''d'' : missing storage-class or type specifiers
C:\Programmi\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(29) : fatal error C1004: unexpected end of file found




The first error usually means you forgot to end a command line with ; somewhere in your code.
The second error is probably the variable d right after the int mentioned in the first error. Add the ; and it should take care of both of these.
The third error may also be fixed by adding the ;, but it also could mean that you forgot a } somewhere in your code.

(silencer)
kevlur
kevlur
Yes, but i dont find neither the ''d'' nor the type ''int'' that it give me errors about, the line of code with reference to are:


..| #if _MSC_VER > 1000 /*IFSTRIP=IGN*/
..| #pragma once
..| #endif
..|
..| #ifndef _INC_TCHAR
..| #define _INC_TCHAR
..|
..| #ifdef _MSC_VER
24| #pragma warning(disable:4514)
25| /* #pragma warning(default:4514) */
26| #endif /* _MSC_VER */
27|
28| #ifdef __cplusplus
29|----> extern "C" {
30| #endif
31|
..|
..| /* Define __cdecl for non-Microsoft compilers */
..|
..| #if ( !defined(_MSC_VER) && !defined(__cdecl) )
..| #define __cdecl
..| #endif

i dont see any ''d'' or type ''int'' there....

kevlur
kevlur
How can i find the right line where there is the error? im trying to find any "C" or ''d'', but i dont find anything that would be the error...
Kylotan
Kylotan
Ignore the 2nd error, as it''s misleading. The first error is what is important. It''s saying there is a semi-colon missing, and since that is a standard library header, the semi-colon is almost certainly missing from your code.

Here''s what I -think- you''ve done:

#include "kevlur_header.h"
#include <tchar.h> (or windows.h, or some other standard header)

And in "kevlur_header.h", you''ve defined a class, but have missed off the semi-colon at the end.

[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
kevlur
kevlur
Ok, i understand, ill serch in the code
Thanks

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.