Author Topic: VS 2005 fixes for 3.6.9 branch  (Read 2354 times)

0 Members and 1 Guest are viewing this topic.

VS 2005 fixes for 3.6.9 branch
In order to compile the current 3.6.9 with Visual Studio 2005 Express I had to fix some bugs and remake the compile environment.  I think I started from the VS2003 environment.  I have attached the complete VS2005 environment.

First bug fix was a MSVC6 error about for loops and variable scoping.   Second was an implicit boolean in outwnd.cpp.  Third was some weird usage of unsigned shorts as WCHAR.  The fourth and largest change was lua.h and lua.cpp to utilized iterators instead of raw pointers.  This was the cause of the vector index off end run-time errors.  In order to determine the "end" raw pointer, code like
Code: [Select]
lib_end = &lua_Libraries[lua_Libraries.size()];
was used.  This volates the VS2005 run-time sanity check, because it expose unallocated memory without ensuring it is not written.  The end iterator fixes this.  Hence, the proper STL way to do this is:
Code: [Select]
lib_end = lua_Libraries.end();

In the end I had to change all pointer types to iterator types and add some new interfaces to the lua_obj_h and lua_lib objects.

I have attached the code patch for the 4 bug-fixes, and an archive containing the new VS2005 environment.

[attachment deleted by admin]

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: VS 2005 fixes for 3.6.9 branch
Hmm.. way to go, 3 posts and you've contributed something on all three.  I can't believe you escaped so long... ;7

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: VS 2005 fixes for 3.6.9 branch
Ooh.  The second coming of taylor, perhaps? :)

Would you like SCP internal access? :D

 
Re: VS 2005 fixes for 3.6.9 branch
If I knew what you meant, I could answer.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: VS 2005 fixes for 3.6.9 branch
Do you want access to the SCP developer board?  It's a child of this board, but private.

Taylor says that many developers prefer mailing lists and are reluctant to visit forums regularly, but we've sort of stayed in the forum groove ever since the source was released back in 2002. :)

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: VS 2005 fixes for 3.6.9 branch
Heh, heh... :welcome:

Exits are to the rear and left.  They have been plastered shut with baguettes and peanut butter, so don’t try to use them. All hallways are monitored by sentry cannons that are equipped with n00b and spam detection systems, so don’t move. Now, don’t breathe. Stay like this for a while.

Under your seat you will find some of Raa’s cookies, Shrike’s dungeon pr0n, an0n’s graffiti, and a soggy newspaper containing news on the events of April 1, 2005; and the forum’s latest highlights, and a flame thrower.  We ran out of napalm on January 7, 2001, so you’ll have to bludgeon people to death.  Be sure to check out the Source Code Project, “A Journey of the Forgotten” in Hard Light Art, and the HLP Store, well, you’ve already discovered, so max out that credit card for HLP rewards miles, which can get you a trip anywhere from Capella to Gamma Draconis, courtesy of the NTF Air!

If for some dull reason you have avoided the sentries and are stuck wandering through the dank, dark ducts, stay armed to the teeth with lunch.  Chances are, you’ll encounter Carl, our local Shivan, so if you do, set down your lunch and slowly step away.  Hopefully he’ll leave you alone—he’s usually satisfied with those.  On the other hand, if you follow Raa, our Professor Tor’h Coolguy Vasudan, you’ll see him enter a kitchen.  Should you wish to peek inside, you’ll see him pull out a box, then a human head.  Should he see you, he’ll pull out a machete…

Welcome to HLP! Have a nice day.*
*recycled welcome, but hey...

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: VS 2005 fixes for 3.6.9 branch
Ooh.  The second coming of taylor, perhaps? :)

litghost is one of the coders I've managed to attract bu waving BtRL around. Hopefully they'll be more. :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 
Re: VS 2005 fixes for 3.6.9 branch
Do you want access to the SCP developer board?  It's a child of this board, but private.

Taylor says that many developers prefer mailing lists and are reluctant to visit forums regularly, but we've sort of stayed in the forum groove ever since the source was released back in 2002. :)

I like forums more than mailing lists, so ya I'll wallow in.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: VS 2005 fixes for 3.6.9 branch
K.  Added.