MinGW and "delcaration does not declare anything"
Posted
by Bob Somers
on Stack Overflow
See other posts from Stack Overflow
or by Bob Somers
Published on 2010-05-02T20:54:09Z
Indexed on
2010/05/02
20:57 UTC
Read the original article
Hit count: 295
I'm working on converting a Linux project of mine to compile on Windows using MinGW. It compiles and runs just fine on Linux, but when I attempt to compile it with MinGW it bombs out with the following error message:
camera.h:11: error: declaration does not declare anything
camera.h:12: error: declaration does not declare anything
I'm kind of baffled why this is happening, because
- I'm using the same version of g++ (4.4) on both Linux and Windows (via MinGW).
- The contents of camera.h is absurdly simple.
Here's the code. It's choking on lines 11 and 12 where float near;
and float far;
are defined.
#include "Vector.h"
#ifndef _CAMERA_H_
#define _CAMERA_H_
class Camera{
public:
Vector eye;
Vector lookAt;
float fov;
float near;
float far;
};
#endif
Thanks for your help.
© Stack Overflow or respective owner