Page 1 of 1

Identifier names conflict with other library

PostPosted: 25 Dec 2011, 11:52
by acme_pjz
I tried to cpmpile under Windows but failed because following identifier names are conflict with system library header files:

In GUIScrollBar.h: 'min' and 'max' [C runtime header files already #define min(x,y) ((x)<(y))?(x):(y) and so on]

In LevelEditor.h: 'DELETE' [windows header file already defined 'DELETE']

In GameObject.cpp: return {0,0,0,0}; [stupid Visual Studio compiler doesn't recognize this]

In LevelEditor.cpp: toolbarRect={205,555,410,50}; [stupid Visual Studio compiler doesn't recognize this]

Re: Identifier names conflict with other library

PostPosted: 25 Dec 2011, 12:04
by acme_pjz
I have upload a new revision to (temporarily) fix problems above.

Re: Identifier names conflict with other library

PostPosted: 26 Dec 2011, 08:18
by Edward_Lii
Hello acme_pjz,

acme_pjz {l Wrote}:I have upload a new revision to (temporarily) fix problems above.

I think it's best if we solve the min/max and DELETE problem.
But I'm afraid that we can't do anything about the last two.

Re: Identifier names conflict with other library

PostPosted: 27 Dec 2011, 07:11
by acme_pjz
Edward_Lii {l Wrote}:But I'm afraid that we can't do anything about the last two.


Not really, for example one can write:

SDL_Rect tmp={0,0,0,0};
return tmp;

This is a bit ugly though :|

Re: Identifier names conflict with other library

PostPosted: 27 Dec 2011, 15:03
by Edward_Lii
Hello acme_pjz,

acme_pjz {l Wrote}:Not really, for example one can write:

SDL_Rect tmp={0,0,0,0};
return tmp;

This is a bit ugly though :|

Well, I can't think of any other so lets stick to this one. :|