RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
 
Post new topic Reply to topic Goto page Previous  1, 2 
View previous topic - View next topic  
Author Message
Bjorn
Demon Hunter


Joined: 29 May 2002
Posts: 1425
Location: Germany

PostPosted: Fri Jun 06, 2003 11:03 pm    Post subject: [quote]

Yeah, it certainly worked. Now I have a lot of other compile errors, but they seem fixable. Thanks a bunch!
Back to top  
DrunkenCoder
Demon Hunter


Joined: 29 May 2002
Posts: 559

PostPosted: Sat Jun 07, 2003 1:53 am    Post subject: Re: Thanks for Ming/Allegro Solution [quote]

Jihgfed Pumpkinhead wrote:

Any idea about any problems this solution might incur in the future? I mean, if that define is best in all situations, it would be default, right?


Im only guessing here, but my guess is this, when using the define you incur one extra level of indirection when using multithreaded
versions of the library, that would mean a slight performance loss
but actually neglibile if you take into account the time actually
spent waiting for or lockin mutexes. But the really wierd part
and what really baffles me is that the've actually made the STL
threadsafe, that should actuallbe be the clients problem to
be portable so it actually seems like the GNU variant tries
to bind people to using their implementaiotn through a quit bad
practice (do note that it's not probhibitated by the standrad) although
it's still standard confromant.
_________________
If there's life after death there is no death, if there's no death we never live. | ENTP
Back to top  
DrunkenCoder
Demon Hunter


Joined: 29 May 2002
Posts: 559

PostPosted: Sat Jun 07, 2003 10:32 am    Post subject: [quote]

Bjørn wrote:
Yeah, it certainly worked. Now I have a lot of other compile errors, but they seem fixable. Thanks a bunch!


Im guessing that you're porting from MSVC6 then you'll have
a slew of scooping bugs, one fix for MSVC is this:
#define for if(1)for
that forces it at least use correct scooping for for-loops.
_________________
If there's life after death there is no death, if there's no death we never live. | ENTP
Back to top  
Mokona
Guest





PostPosted: Thu Jun 26, 2003 4:29 pm    Post subject: [quote]

Slightly safer (as a hack to make MSVC's for loops more standard) is:
Code:
#define for if(0) ; else for

(otherwise you can end up with 'else' statements binding to the 'if' inside the macro, which is bad!)
Back to top  
Bjorn
Demon Hunter


Joined: 29 May 2002
Posts: 1425
Location: Germany

PostPosted: Thu Jun 26, 2003 7:49 pm    Post subject: [quote]

Thanks for the suggestions, although I was aware of that problem and always declare variables before using them in a for loop. Most of the other errors where because of libraries not installed for MingW (AllegroOGG and Lua for example) and compiling with gcc instead of g++ (somehow this has worked in the past but not anymore). I have this fixed now and it's compiling splendidly.
Back to top  
Post new topic Reply to topic Page 2 of 2 All times are GMT
Goto page Previous  1, 2 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum