Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I am trying to compile a project in visual studio 2003 .net. I have to inclue a couple of .cpp and .h files that someone else has written and for these I have to include a directory for the headers and the .lib in the project settings.

I now get the error:

C2143: syntax error: missing ';' before ','.

This error points me to the file basetds.h and the line:
typedef signed int INT32, *PINT32;


I really have done loads of hunting around on the internet and just can't find a solution to my problem.
Posted
Comments
Lakamraju Raghuram 19-Apr-12 7:46am    
Give the code that is creating this problem.
If those .h or .CPP have any CLR sytax, check if the /clr switch is on
Jackie Lloyd 19-Apr-12 9:29am    
Hi, Thankyou for you reply. I tried putting the /clr switch on and it made no difference. I am not sure what code to give - I am including a load of headers which are not mine in my project by adding an include directory to the project settings. If I don't incorporate these headers and a couple of.cpp and .h files written by someone else and a .lib, then my project compiles. The error message from the compiler doesn't tell me where the error is being caused in my project, it just points me to the microsoft file basetds.h

1 solution

The statement is valid, the following program
C++
#include <iostream> 
typedef signed int INT32, *PINT32;
 
 int main()
 {
   INT32 i32 = 5;
   PINT32 pi32 = &i32;
   std::cout << i32 << ", " << pi32 << ", "  << *pi32 << std::endl;
   return 0;
 } 


compiles (and runs) fine on my system (I have VS 2005).
 
Share this answer
 
v3
Comments
Jackie Lloyd 19-Apr-12 9:44am    
If I remove the two .cpp and .h files from my project that I have had to include then I add code like yours above, my project compiles fine. I can even include basetds.h in my stdafx.h and it compiles. I just don't know what is wrong when I have to add in the other files.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900