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(328) : 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(488) : 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 |
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. |
thanks Merth :)
|
Quote:
Code:
for(int i=0; i < 10; i++) either: Code:
for(int i=0; i < 10; i++) Code:
int i; |
Is the .clear command from .net?
I replaced all the .clear with .empty and all compiled without errors. |
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. |
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. |
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. |
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. |
I used .erase() instead of .clear(), seems to work.
|
All times are GMT -4. The time now is 07:55 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.