Identifier names conflict with other library

Identifier names conflict with other library

Postby acme_pjz » 25 Dec 2011, 11:52

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]
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Identifier names conflict with other library

Postby acme_pjz » 25 Dec 2011, 12:04

I have upload a new revision to (temporarily) fix problems above.
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Identifier names conflict with other library

Postby Edward_Lii » 26 Dec 2011, 08:18

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.
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: Identifier names conflict with other library

Postby acme_pjz » 27 Dec 2011, 07:11

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 :|
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Identifier names conflict with other library

Postby Edward_Lii » 27 Dec 2011, 15:03

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. :|
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Who is online

Users browsing this forum: No registered users and 1 guest