Sign in to follow this  

Strange compilation errors with mingw

Recommended Posts

I've recently been getting too many INTERNAL COMPILER ERRORs with VC++ for my patience and so decided to try to switch to using mingw instead of the compiler that comes with VC++ (tried this before... but I finally found a descent alternative IDE as well). The problem that I get compiling my sources seems quite strange, I have the function:
inline v2 norm()
		float l = length();
	>>>	return v2(x/l,y/l);

The line with the carrots (>>>) generates the error: error: no matching function for call to 'v2::v2(v2)' I have the constructors:
	inline v2(float ix,float iy){x=ix;y=iy;}
	inline v2(float *v){memcpy(&x,v,sizeof(float)*2);}
	inline v2(v2 &o){x=o.x;y=o.y;}

And this sort of thing always compiled with VC++ (of course it's not exactly standards compliant), so could someone point out my stupid mistake here? I've tried playing around with it for a while to no avail, and all help is greatly appreciated, ~SPH

Share this post

Link to post
Share on other sites
Maybe not answering your real question: about the Internal compiler errors: are you compiling source that you have one a network drive? Visual C++ seems unable to handle that, copy it to a local drive and your fine..

Share this post

Link to post
Share on other sites
typename list<Character*>::iterator it;

iterator is a dependent name and therefore requires the typename keyword to disambiguate it.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this