Click here to Skip to main content
12,630,137 members (26,753 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C++ Visual-Studio
Hi im trying to build a project in VS2008, i got these errors

Error   1   error C2143: syntax error : missing ';' before '['
    C:\Program Files\Microsoft Visual Studio 9.0\VC\include\io.h    185 lmlib
.
.
.
Error   7   error C2143: syntax error : missing ';' before 'type'
    C:\Program Files\Microsoft Visual Studio 9.0\VC\include\io.h    192 lmlib
.
.
.
Error	600	fatal error C1083: Cannot open include file: 'X11/keysym.h': No such file or directory	c:\Users\vijay\Desktop\gpsrc_git\trunk\GridPro\az\util\system.h	18	azlib

this project works fine in VS2005,when im trying to build in VS2008 errors are coming
can anyone tell me how to resolve these errors ,thanks in advance
Posted 25-Jan-13 0:20am
Comments
CHill60 25-Jan-13 6:45am
   
Check the header file that you've included in your source immediately before io.h - particularly the last characters. I've come across a similar issue where there was a typo in the preceeding header, and also where someone had hit a random key when typing in the include - error was reported further down
Matthew Faithfull 25-Jan-13 9:20am
   
CHill60 is probably right. This is definitely a header issue before io.h. Probably an inclusion order/path priority problem. Something trying to include an X11 header during a Windows build could indicate you've got a multiplatform project that confused between Windows and Linux builds which could also be caused by the order of include paths being searched. Have a look at the include folders in you IDE or -I entries in your Make file. Make sure all the 'system' ones i.e. built in ones from Visual Studio and Microsoft SDK's come before any of the project specific ones like C:\Users...\GridPro\ or relative ones like ..\..\include

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Quote:
Error 1 error C2143: syntax error : missing ';' before '['
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\io.h 185 lmlib


Usually when you get this type of error, it means that you have something that is not defined before it is used (specially when it occurs in a standard VC include file. If something is not defined, the problem is usually that the order of inclusion of header files is not right somewhere. It could also be caused by erroneous code before the inclusion of io.h as stated in the comments above.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161205.3 | Last Updated 25 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100