After writing some code today, i tried to compile the project and got :
1>c:\ohjelmia\visual studio\vc\include\math.h(29) : error C2144: syntax error : 'int' should be preceded by ';' 1>c:\ohjelmia\visual studio\vc\include\math.h(29) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-intNaturally I thought that I just forgot closing bracket or semicolon.
Well apparently thats not the case, after alot of trial and error I
figured that wx widgets app.h header caused that, wich is weird
given that it compiled fine yesterday. :/
So next I thought that I had modified some of the wx sources by
accident, so I reinstalled wx widgets. That didnt help.
Before you say that I got the error source wrong, this code causes 2144 & 4430
#include <iostream>
#include <iomanip>
#include <wx/setup.h>
#include <wx/app.h> // if i remove this itll run as expected
int main( int argc, char** argv )
{
std::cout << "test" << std::endl;
return 0;
}
Is there something Iam missing ?
Any and all help would be appreciated. (:
edit:
After tracing it a bit heres where the math.h is included :
#ifndef _WX_MATH_H_ #define _WX_MATH_H_ #include "wx/defs.h" #include <math.h>
And error happens in math.h :
#ifdef __cplusplus
extern "C" {
#endif
Doesnt make sense to me.
edit:
In fact it propably got nothing to do with wx widgets
#include <math.h>
int main( int argc, char** argv )
{
return 0;
}
This does not compile for me. :/
Edited by julmuri, 28 January 2009 - 07:36 AM.


Sign In
Create Account


Back to top









