Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-17-2003, 03:38 AM
tcsmyworld's Avatar
tcsmyworld
Discordant
 
Join Date: Feb 2002
Posts: 452
Default Compile errors in VC++ 6.0

Previous versions have compiled with no problems, but this new release returns a handful of errors and I can't figure out what I'm missing.
Here's a listing of the errors, any help would be appreciated.

errors in zone-

C:\Program Files\Microsoft Visual Studio\EqEmu050\Zone\attack.cpp(142) : error C2065: 'DEBUG' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\EqEmu050\Zone\client.cpp(7316) : error C2065: 'DEBUG' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\EqEmu050\Zone\client_process.cpp(32 : error C2065: 'DEBUG' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\EqEmu050\Zone\client_process.cpp(5910) : error C2371: 'i' : redefinition; different basic types
C:\Program Files\Microsoft Visual Studio\EqEmu050\Zone\client_process.cpp(5900) : see declaration of 'i'
C:\Program Files\Microsoft Visual Studio\EqEmu050\Zone\MobAI.cpp(307) : error C2065: 'DEBUG' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\EqEmu050\Zone\parser.cpp(57) : error C2039: 'clear' : is not a member of 'basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
C:\Program Files\Microsoft Visual Studio\EqEmu050\Zone\parser.cpp(94) : error C2228: left of '.base' must have class/struct/union type
C:\Program Files\Microsoft Visual Studio\EqEmu050\Zone\spells.cpp(48 : error C2065: 'DEBUG' : undeclared identifier


29 errors for 'clear' lines-57,71,114,152,169,172,255,542,925,937,986,1037,107 0,1264,1274,1275,1276,1277,1365,1366,1375,1376,
1386,1392,1393,1394,1400,1443,1459 all in parser.cpp

4 errors for '.base' lines- 94,98,102,106 all in parser.cpp


error in EMuShareMem-


C:\Program Files\Microsoft Visual Studio\EqEmu050\EMuShareMem\NPCFactionLists.cpp(55 ) : error C2065: 'DEBUG' : undeclared identifier
Reply With Quote
  #2  
Old 07-17-2003, 04:50 AM
Merth
Dragon
 
Join Date: May 2003
Location: Seattle, WA
Posts: 609
Default

For the DEBUG errors, go to Project/Settings and add DEBUG to the preprocessor defines.

For the other errors, just comment out the lines that are giving problems. Not sure at this point why vs6 complains about them.
Reply With Quote
  #3  
Old 07-17-2003, 04:56 AM
tcsmyworld's Avatar
tcsmyworld
Discordant
 
Join Date: Feb 2002
Posts: 452
Default

thanks Merth
Reply With Quote
  #4  
Old 07-17-2003, 05:10 AM
alkrun
Sarnak
 
Join Date: Jan 2002
Posts: 66
Default

Quote:
C:\Program Files\Microsoft Visual Studio\EqEmu050\Zone\client_process.cpp(5910) : error C2371: 'i' : redefinition; different basic types
That one is because VC6 has a bit of broken ansi compatibility about declaring a variable in a for declaration. An example:

Code:
for(int i=0; i < 10; i++)
{
}

for(int i=0; i < 20; i++)
{
}
That won't compile. It's ANSI compliant to do that, but VC6 doesn't allow it because of a scope bug. The best way to rewrite that would be either to use a different name for your indexer or declare i outside of the for declarations.

either:
Code:
for(int i=0; i < 10; i++)
{
}

for(int j=0; j < 20; j++)
{
}
or:
Code:
int i;
for(i = 0; i < 10; i++)
{
}
for(i = 0; i < 20; i++)
{
}
Reply With Quote
  #5  
Old 07-17-2003, 09:55 AM
tcsmyworld's Avatar
tcsmyworld
Discordant
 
Join Date: Feb 2002
Posts: 452
Default

Is the .clear command from .net?
I replaced all the .clear with .empty and all compiled without errors.
Reply With Quote
  #6  
Old 07-17-2003, 10:11 AM
alkrun
Sarnak
 
Join Date: Jan 2002
Posts: 66
Default

clear() removes all elements, empty() tests if the string is empty or not. So replacing one with the other will have nasty side-effects.

clear() is not something new in STL. I don't know why it's giving an error. I haven't used VC6 in a while, but I do remember that it is pretty bad about the STL templates.
Reply With Quote
  #7  
Old 07-17-2003, 10:14 AM
tcsmyworld's Avatar
tcsmyworld
Discordant
 
Join Date: Feb 2002
Posts: 452
Default

Is there an equivelant of clear that might work in VC6?

BTW your calc fix took care of the .base errors I was having , thx.
Reply With Quote
  #8  
Old 07-17-2003, 10:25 AM
alkrun
Sarnak
 
Join Date: Jan 2002
Posts: 66
Default

Since you're just working with strings you could remove the call to clear and just set the string to "".

That might not function the exact same as clear() but it's close enough.
Reply With Quote
  #9  
Old 07-17-2003, 11:04 AM
tcsmyworld's Avatar
tcsmyworld
Discordant
 
Join Date: Feb 2002
Posts: 452
Default

Thx , that fixed a few ingame problems
Here the wierdest part yet, I found 6 instances of .clear in the parser.cpp(same file all the other errors were in) that don't return errors.
Reply With Quote
  #10  
Old 07-18-2003, 02:18 AM
used_pawn
Sarnak
 
Join Date: Apr 2003
Posts: 53
Default

I used .erase() instead of .clear(), seems to work.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:25 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3