Compile errors: March 16 2004 18:38:07 Release

Need help running MacroQuest2? Ask your questions about how to get things to work on your computer.

Moderator: MacroQuest Developers

mrjoshuanc
orc pawn
orc pawn
Posts: 14
Joined: Tue Mar 16, 2004 10:29 pm

Compile errors: March 16 2004 18:38:07 Release

Post by mrjoshuanc » Tue Mar 16, 2004 10:35 pm

Now, normally I'm a good lurker, strong RTFM proponent, all around self sufficient user. But this one I'm not sure how to fix, I'm just not that good. I'll assume this release is current from the date, so if anyone has any suggestions (or how I was just simply stupid and missed something easy) by all means...and thanks :)

Using VS .NET at my office to compile, I receive the following output.

Compiling...
MQ2Utilities.cpp
MQ2Utilities.cpp(1212) : error C2668: 'abs' : ambiguous call to overloaded function
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(584): could be 'long double abs(long double)'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(536): or 'float abs(float)'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(530): or 'double abs(double)'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(528): or 'long abs(long)'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\stdlib.h(265): or 'int abs(int)'
while trying to match the argument list '(DWORD)'
MQ2Utilities.cpp(1248) : error C2668: 'abs' : ambiguous call to overloaded function
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(584): could be 'long double abs(long double)'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(536): or 'float abs(float)'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(530): or 'double abs(double)'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(528): or 'long abs(long)'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\stdlib.h(265): or 'int abs(int)'
while trying to match the argument list '(DWORD)'
MQ2Commands.cpp
MQ2CommandAPI.cpp
MQ2CleanUI.cpp
MQ2ChatHook.cpp
MQ2Benchmarks.cpp
MQ2Auth.cpp
EQClasses.cpp

Build log was saved at "file://c:\Documents and Settings\mrjoshua\Desktop\MacroQuest\MQ2Main\Intermediate\BuildLog.htm"
MQ2Main - 2 error(s), 0 warning(s)


------ Build started: Project: MQ2Map, Configuration: Release Win32 ------

Compiling...
MQ2MapCommands.cpp
EQLIB_IMPORTS
MQ2MapAPI.cpp
MQ2Map.cpp
Linking...
LINK : fatal error LNK1181: cannot open input file '..\Release\MQ2Main.lib'

Build log was saved at "file://c:\Documents and Settings\mrjoshua\Desktop\MacroQuest\MQ2Map\Intermediate\BuildLog.htm"
MQ2Map - 1 error(s), 0 warning(s)


------ Build started: Project: MQ2Telnet, Configuration: Release Win32 ------

Compiling...
WinTelnet.cpp
TelnetServer.cpp
EQLIB_IMPORTS
mq2telnet.cpp
EQLIB_IMPORTS
Linking...
LINK : fatal error LNK1181: cannot open input file '..\Release\MQ2Main.lib'

Build log was saved at "file://c:\Documents and Settings\mrjoshua\Desktop\MacroQuest\mq2telnet\Intermediate\BuildLog.htm"
MQ2Telnet - 1 error(s), 0 warning(s)


------ Build started: Project: MQ2Labels, Configuration: Release Win32 ------

Compiling...
MQ2Labels.cpp
EQLIB_IMPORTS
Linking...
LINK : fatal error LNK1181: cannot open input file '..\Release\MQ2Main.lib'

Build log was saved at "file://c:\Documents and Settings\mrjoshua\Desktop\MacroQuest\MQ2Labels\Intermediate\BuildLog.htm"
MQ2Labels - 1 error(s), 0 warning(s)


------ Build started: Project: MQ2ItemDisplay, Configuration: Release Win32 ------

Compiling...
MQ2ItemDisplay.cpp
EQLIB_IMPORTS
Linking...
LINK : fatal error LNK1181: cannot open input file '..\Release\MQ2Main.lib'

Build log was saved at "file://c:\Documents and Settings\mrjoshua\Desktop\MacroQuest\MQ2ItemDisplay\Intermediate\BuildLog.htm"
MQ2ItemDisplay - 1 error(s), 0 warning(s)


------ Build started: Project: MQ2Irc, Configuration: Release Win32 ------

Compiling...
MQ2Irc.cpp
EQLIB_IMPORTS
Linking...
LINK : fatal error LNK1181: cannot open input file '..\Release\MQ2Main.lib'

Build log was saved at "file://c:\Documents and Settings\mrjoshua\Desktop\MacroQuest\MQ2Irc\Intermediate\BuildLog.htm"
MQ2Irc - 1 error(s), 0 warning(s)


------ Build started: Project: MQ2FPS, Configuration: Release Win32 ------

Compiling...
MQ2FPS.cpp
EQLIB_IMPORTS
Linking...
LINK : fatal error LNK1181: cannot open input file '..\Release\MQ2Main.lib'

Build log was saved at "file://c:\Documents and Settings\mrjoshua\Desktop\MacroQuest\Mq2fps\Intermediate\BuildLog.htm"
MQ2FPS - 1 error(s), 0 warning(s)


------ Build started: Project: MQ2EQIM, Configuration: Release Win32 ------

Compiling...
MQ2EQIM.cpp
EQLIB_IMPORTS
Linking...
LINK : fatal error LNK1181: cannot open input file '..\Release\MQ2Main.lib'

Build log was saved at "file://c:\Documents and Settings\mrjoshua\Desktop\MacroQuest\Mq2eqim\Intermediate\BuildLog.htm"
MQ2EQIM - 1 error(s), 0 warning(s)


------ Build started: Project: MQ2EQBugFix, Configuration: Release Win32 ------

Compiling...
MQ2EQBugFix.cpp
EQLIB_IMPORTS
Linking...
LINK : fatal error LNK1181: cannot open input file '..\Release\MQ2Main.lib'

Build log was saved at "file://c:\Documents and Settings\mrjoshua\Desktop\MacroQuest\MQ2EQBugFix\Intermediate\BuildLog.htm"
MQ2EQBugFix - 1 error(s), 0 warning(s)


------ Build started: Project: MQ2CustomBinds, Configuration: Release Win32 ------

Compiling...
MQ2CustomBinds.cpp
EQLIB_IMPORTS
Linking...
LINK : fatal error LNK1181: cannot open input file '..\Release\MQ2Main.lib'

Build log was saved at "file://c:\Documents and Settings\mrjoshua\Desktop\MacroQuest\MQ2CustomBinds\Intermediate\BuildLog.htm"
MQ2CustomBinds - 1 error(s), 0 warning(s)


------ Build started: Project: MQ2ChatWnd, Configuration: Release Win32 ------

Compiling...
MQ2ChatWnd.cpp
EQLIB_IMPORTS
Linking...
LINK : fatal error LNK1181: cannot open input file '..\Release\MQ2Main.lib'

Build log was saved at "file://c:\Documents and Settings\mrjoshua\Desktop\MacroQuest\MQ2ChatWnd\Intermediate\BuildLog.htm"
MQ2ChatWnd - 1 error(s), 0 warning(s)


------ Build started: Project: MQ2Chat, Configuration: Release Win32 ------

Compiling...
MQ2Chat.cpp
EQLIB_IMPORTS
Linking...
LINK : fatal error LNK1181: cannot open input file '..\Release\MQ2Main.lib'

Build log was saved at "file://c:\Documents and Settings\mrjoshua\Desktop\MacroQuest\MQ2Chat\Intermediate\BuildLog.htm"
MQ2Chat - 1 error(s), 0 warning(s)


------ Build started: Project: MQ2Bzsrch, Configuration: Release Win32 ------

Compiling...
MQ2Bzsrch.cpp
EQLIB_IMPORTS
Linking...
LINK : fatal error LNK1181: cannot open input file '..\Release\MQ2Main.lib'

Build log was saved at "file://c:\Documents and Settings\mrjoshua\Desktop\MacroQuest\MQ2Bzsrch\Intermediate\BuildLog.htm"
MQ2Bzsrch - 1 error(s), 0 warning(s)


---------------------- Done ----------------------

Build: 0 succeeded, 13 failed, 0 skipped

carpaltunnel
a lesser mummy
a lesser mummy
Posts: 31
Joined: Thu Sep 04, 2003 3:52 pm

Post by carpaltunnel » Tue Mar 16, 2004 10:47 pm

I'm getting the same error, using VS .NET as well. I found 1 other post on the problem, but I'm not sure how to apply that to this code.

http://macroquest2.com/phpBB2/viewtopic.php?t=2763

mrjoshuanc
orc pawn
orc pawn
Posts: 14
Joined: Tue Mar 16, 2004 10:29 pm

Post by mrjoshuanc » Tue Mar 16, 2004 10:49 pm

Here are the offending lines mq2utilities.cpp (1212 & 1248)

switch(abs(EffectID))

sprintf(szTemp, "UndefinedEffect%03d", abs(EffectID));


From reading that, I'm not quite sure what I could change besides abs with int. Oh well, good time to learn something eh? :) Gonna try it and see what happens.

mrjoshuanc
orc pawn
orc pawn
Posts: 14
Joined: Tue Mar 16, 2004 10:29 pm

Post by mrjoshuanc » Tue Mar 16, 2004 11:01 pm

Ok, just replaced abs with int and got a successful compile, however it does break any scripts that use right clicks I guess, since apparently this is exactly the area of mq2utilities i just broke with my change =/

Guess I'll have to dig up a copy of VS6. Grrrr.

carpaltunnel
a lesser mummy
a lesser mummy
Posts: 31
Joined: Thu Sep 04, 2003 3:52 pm

Post by carpaltunnel » Tue Mar 16, 2004 11:25 pm

Well after chatting with a friend, I removed abs from both lines. Compiled fine, running in game, right click item works fine for me in a macro.

devNull
a ghoul
a ghoul
Posts: 121
Joined: Sat Mar 06, 2004 3:57 am

Post by devNull » Wed Mar 17, 2004 4:15 am

What about casting the DWORD to int or long?

Code: Select all

switch(abs( (int) EffectID )) 

sprintf(szTemp, "UndefinedEffect%03d", abs( (int) EffectID ));
or

Code: Select all

switch( (int) abs( (long) EffectID )) 

sprintf(szTemp, "UndefinedEffect%03d", (int) abs( (long) EffectID ));

jumbotron
decaying skeleton
decaying skeleton
Posts: 6
Joined: Tue Feb 10, 2004 4:50 pm

Post by jumbotron » Wed Mar 17, 2004 4:45 am

I got the same errors. Fatal errors and build failed using VS.NET.

Thanks for the great work you guys do. Very enjoyable product.

JT

jumbotron
decaying skeleton
decaying skeleton
Posts: 6
Joined: Tue Feb 10, 2004 4:50 pm

Post by jumbotron » Wed Mar 17, 2004 5:07 am

Changing the code in MQ2Utilities.cpp on lines 1212 and 1248 (if I recall) to the following code allowed VC.NET to compile without errors.


switch(abs( (int) EffectID ))

sprintf(szTemp, "UndefinedEffect%03d", abs( (int) EffectID ));


Thank you DevNull,

JT

CrankyBaby
a lesser mummy
a lesser mummy
Posts: 58
Joined: Thu Mar 11, 2004 5:12 pm
Location: Tijuana.bc.mx
Contact:

Post by CrankyBaby » Wed Mar 17, 2004 5:31 am

Casting them to (long) works as well, and might keep more info intact.

It's just a style thing from that point, though.
Okay, okay, I take it back - "UnF--k you."

“If you play the WinXP CD backwards,
you get a satanic message.”
“That's nothing, if you play it forward,
it installs WinXP.”

koad
Plugins Czar
Posts: 127
Joined: Fri May 16, 2003 8:32 pm

Post by koad » Wed Mar 17, 2004 7:07 am

this is from the update that was merged from my plugin's update that i posted the other day to mq2spellsearch, that code was redone and i neglected to include the typecasting for compatibility in .net

User avatar
vzmule
Contributing Member
Contributing Member
Posts: 378
Joined: Thu Mar 13, 2003 11:56 pm

Post by vzmule » Wed Mar 17, 2004 9:57 am

You'll only have this problem if you're using 2003 version of .net. Compiles fine under .net standard (2002).

To fix it, see
http://macroquest2.com/phpBB2/viewtopic ... ght=#18434
[size=100][url]http://forever-hacking.com[/url][/size]

huckleberry
orc pawn
orc pawn
Posts: 18
Joined: Thu Jan 16, 2003 12:37 am

compile error

Post by huckleberry » Wed Mar 17, 2004 11:38 am

I am getting
undeclared identifier for

_ActualVersionDate
_ActualVersionTime
_ExpectedVersionDate
_expectedVersionTime

any suggestions (besides use search as it brings up nothing)

using .net 2003

Thanks in advance

----------------------------
nm - must have been a conflict with the new download from today and the offests (from thread yeterday) - recompiled with DL'ed offsets .. no errors
Last edited by huckleberry on Wed Mar 17, 2004 12:21 pm, edited 1 time in total.

Sensay
orc pawn
orc pawn
Posts: 26
Joined: Thu Dec 11, 2003 12:06 am
Location: VA
Contact:

Post by Sensay » Wed Mar 17, 2004 12:11 pm

nm found it
Last edited by Sensay on Wed Mar 17, 2004 12:09 pm, edited 1 time in total.

morgar
decaying skeleton
decaying skeleton
Posts: 3
Joined: Sun Nov 09, 2003 4:01 am

Post by morgar » Wed Mar 17, 2004 12:13 pm

Hrmm I must be missing something, because when I go to download MQ2, the only thing in the zipfile is a readme.txt. Where did you guys get this version from? (I tried downloading from the downloads section)..

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Wed Mar 17, 2004 12:59 pm

Hrmm I must be missing something, because when I go to download MQ2, the only thing in the zipfile is a readme.txt. Where did you guys get this version from? (I tried downloading from the downloads section)..
Whatever you're smoking, pass it this way.. and secondly why did you hijack a random thread to post that you're an idiot, having nothing at all to do with the topic?

Anyway anyone that gets this problem, replace abs(EffectID) with simply EffectID. abs as you know gets the absolute value of an integer, which does this: If (val<0) val=-val; However, EffectID is a DWORD, and a DWORD is an "unsigned long". Unsigned means that there is no possibility of negativity (will always be non-negative). Therefore, abs does nothing. Remove the abs.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0