EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   compiling build failed (https://www.eqemulator.org/forums/showthread.php?t=37890)

azog 02-23-2014 08:39 AM

compiling build failed
 
I don't see any errors in the log just build failed. this is the win32 build cmake was successful. 02-02-2014 was the source download date.
compiling with VS2010 sp1, I can't upgrade my zpro past winXP64 so im stuck with vs2010.
.
.

Code:

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
1>Build started 2/23/2014 10:14:27 AM.
1>InitializeBuildStatus:
1>  Creating "Win32\Debug\ZERO_CHECK\ZERO_CHECK.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>FinalizeBuildStatus:
1>  Deleting file "Win32\Debug\ZERO_CHECK\ZERO_CHECK.unsuccessfulbuild".
1>  Touching "Win32\Debug\ZERO_CHECK\ZERO_CHECK.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:00.51
2>------ Build started: Project: zone, Configuration: Debug Win32 ------
2>Build started 2/23/2014 10:14:30 AM.
2>InitializeBuildStatus:
2>  Touching "zone.dir\Debug\zone.unsuccessfulbuild".
2>CustomBuild:
2>  All outputs are up-to-date.
2>ClCompile:
2>  spell_effects.cpp
2>..\..\zone\spell_effects.cpp(319): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(403): warning C4244: '=' : conversion from 'const int' to 'float', possible loss of data
2>..\..\zone\spell_effects.cpp(404): warning C4244: '=' : conversion from 'const int' to 'float', possible loss of data
2>..\..\zone\spell_effects.cpp(405): warning C4244: '=' : conversion from 'const int' to 'float', possible loss of data
2>..\..\zone\spell_effects.cpp(406): warning C4244: '=' : conversion from 'const int' to 'float', possible loss of data
2>..\..\zone\spell_effects.cpp(467): warning C4244: '=' : conversion from 'const int' to 'float', possible loss of data
2>..\..\zone\spell_effects.cpp(468): warning C4244: '=' : conversion from 'const int' to 'float', possible loss of data
2>..\..\zone\spell_effects.cpp(469): warning C4244: '=' : conversion from 'const int' to 'float', possible loss of data
2>..\..\zone\spell_effects.cpp(470): warning C4244: '=' : conversion from 'const int' to 'float', possible loss of data
2>..\..\zone\spell_effects.cpp(768): warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
2>..\..\zone\spell_effects.cpp(834): warning C4244: '=' : conversion from 'float' to 'int32', possible loss of data
2>..\..\zone\spell_effects.cpp(846): warning C4244: '=' : conversion from 'float' to 'uint16', possible loss of data
2>..\..\zone\spell_effects.cpp(880): warning C4244: '=' : conversion from 'const float' to 'uint32', possible loss of data
2>..\..\zone\spell_effects.cpp(929): warning C4244: '=' : conversion from 'const float' to 'uint32', possible loss of data
2>..\..\zone\spell_effects.cpp(965): warning C4244: '=' : conversion from 'const float' to 'uint32', possible loss of data
2>..\..\zone\spell_effects.cpp(1015): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(1040): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(1065): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(1083): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(1436): warning C4244: 'argument' : conversion from 'const float' to 'uint32', possible loss of data
2>..\..\zone\spell_effects.cpp(1624): warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data
2>..\..\zone\spell_effects.cpp(1851): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(1856): warning C4018: '>=' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(1883): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(1888): warning C4018: '>=' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(1918): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(1923): warning C4018: '>=' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(1953): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(1958): warning C4018: '>=' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(2001): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
2>..\..\zone\spell_effects.cpp(2034): warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data
2>..\..\zone\spell_effects.cpp(2035): warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data
2>..\..\zone\spell_effects.cpp(2036): warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data
2>..\..\zone\spell_effects.cpp(2356): warning C4244: 'argument' : conversion from 'const float' to 'int32', possible loss of data
2>..\..\zone\spell_effects.cpp(2366): warning C4244: 'argument' : conversion from 'const float' to 'int32', possible loss of data
2>..\..\zone\spell_effects.cpp(2384): warning C4244: 'argument' : conversion from 'const float' to 'int32', possible loss of data
2>..\..\zone\spell_effects.cpp(2394): warning C4244: 'argument' : conversion from 'const float' to 'int32', possible loss of data
2>..\..\zone\spell_effects.cpp(2449): warning C4018: '<=' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(2466): warning C4244: 'argument' : conversion from 'const float' to 'int32', possible loss of data
2>..\..\zone\spell_effects.cpp(2478): warning C4244: 'argument' : conversion from 'const float' to 'int32', possible loss of data
2>..\..\zone\spell_effects.cpp(2582): warning C4018: '<=' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(2605): warning C4244: 'argument' : conversion from 'const int' to 'float', possible loss of data
2>..\..\zone\spell_effects.cpp(3088): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(3425): error C2668: 'sqrt' : ambiguous call to overloaded function
2>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\math.h(589): could be 'long double sqrt(long double)'
2>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\math.h(541): or      'float sqrt(float)'
2>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\math.h(127): or      'double sqrt(double)'
2>          while trying to match the argument list '(int32)'
2>..\..\zone\spell_effects.cpp(4010): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(4015): warning C4018: '>' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(4873): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(5060): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(5188): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(5328): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(5361): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(5399): warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
2>..\..\zone\spell_effects.cpp(5437): warning C4018: '<' : signed/unsigned mismatch
2>..\..\zone\spell_effects.cpp(5494): warning C4018: '<' : signed/unsigned mismatch
2>
2>Build FAILED.
2>
2>Time Elapsed 00:00:11.92
3>------ Build started: Project: ALL_BUILD, Configuration: Debug Win32 ------
3>Build started 2/23/2014 10:14:42 AM.
3>InitializeBuildStatus:
3>  Creating "Win32\Debug\ALL_BUILD\ALL_BUILD.unsuccessfulbuild" because "AlwaysCreate" was specified.
3>CustomBuild:
3>  Build all projects
3>FinalizeBuildStatus:
3>  Deleting file "Win32\Debug\ALL_BUILD\ALL_BUILD.unsuccessfulbuild".
3>  Touching "Win32\Debug\ALL_BUILD\ALL_BUILD.lastbuildstate".
3>
3>Build succeeded.
3>
3>Time Elapsed 00:00:00.40
========== Build: 2 succeeded, 1 failed, 8 up-to-date, 0 skipped ==========


azog 02-23-2014 10:21 AM

here's the error from above

2>..\..\zone\spell_effects.cpp(3425): error C2668: 'sqrt' : ambiguous call to overloaded function

gibroni 02-23-2014 02:34 PM

i get the same error as stated above.

Davood 02-23-2014 04:48 PM

same
do i have to upgrade to vs2012 :((((((((((

Davood 02-23-2014 05:01 PM

Code:

                                        float distanse =sqrt(
                                                                        ((GetX() - buffs[slot].caston_x) * (GetX() - buffs[slot].caston_x)) +
                                                                        ((GetY() - buffs[slot].caston_y) *  (GetY() - buffs[slot].caston_y)) +
                                                                        ((GetZ() - buffs[slot].caston_z) * (GetZ() - buffs[slot].caston_z)));

                                        int distance = int(distanse);

i hacked that in.. lets see if it breaks things.

it didnt like running sqrt as an int because it didn't match some prerequisitie to insicate how to use sqrt int hat instance.. ambigiouous functions are bad mk

Davood 02-23-2014 05:02 PM

Sorry

that was line 3421 with the "int distance = sqrt (whatever" that I replaced in spell_effects.cpp

someone who is good with teh fancy formattign can provide a diff statement ?

Davood 02-23-2014 05:21 PM

seems to work so far
server loaded fine

Davood 02-23-2014 05:38 PM

https://github.com/davoodinator/Serv...8de34836bd2901

Code:

zone/spell_effects.cpp

@@ -3418,11 +3418,12 @@ void Mob::DoBuffTic(uint16 spell_id, int slot, uint32 ticsremaining, uint8 caste

                        {

                                if (spellbonuses.DistanceRemoval){

 

-                                        int distance =        sqrt(

-                                                                        ((int(GetX()) - buffs[slot].caston_x) * (int(GetX()) - buffs[slot].caston_x)) +

-                                                                        ((int(GetY()) - buffs[slot].caston_y) *  (int(GetY()) - buffs[slot].caston_y)) +

-                                                                        ((int(GetZ()) - buffs[slot].caston_z) * (int(GetZ()) - buffs[slot].caston_z))

-                                                                        );

+                                        float distanse =sqrt(

+                                                                        ((GetX() - buffs[slot].caston_x) * (GetX() - buffs[slot].caston_x)) +

+                                                                        ((GetY() - buffs[slot].caston_y) *  (GetY() - buffs[slot].caston_y)) +

+                                                                        ((GetZ() - buffs[slot].caston_z) * (GetZ() - buffs[slot].caston_z)));

+

+                                        int distance = int(distanse);

 

                                        if (distance > spells[spell_id].base[i]){


azog 02-24-2014 04:18 PM

That did the trick thanks

wolfwalkereci 02-26-2014 11:46 AM

Just came across this issue this morning and was curious if it would be cleaner to do this:
Code:

                    int distance =    sqrt((double)
                                    ((int(GetX()) - buffs[slot].caston_x) * (int(GetX()) - buffs[slot].caston_x)) +
                                    ((int(GetY()) - buffs[slot].caston_y) *  (int(GetY()) - buffs[slot].caston_y)) +
                                    ((int(GetZ()) - buffs[slot].caston_z) * (int(GetZ()) - buffs[slot].caston_z))
                                    );

Not something I am knowledgeable about in the least. Most of the google results recommended explicit type casting.
This way does compile but I have no idea if it actually works, I do not have a test server setup at this time.

gibroni 02-26-2014 01:14 PM

wondering if this is just a vs 2010 issue? noticed there have been quite a few changes to git files, but all of them still fail on the build. was gonna wait and see if fix was gonna be put in, but maybe I just have to follow this thread and make these changes everytime I rebuild with new git download?

Uleat 02-26-2014 03:28 PM

I'm running vs2010 on xp..lemme see what happens when I compile..


EDIT: ..fails for me too... let me look at this and see what I can do or pass it on :)

Davood 02-26-2014 03:45 PM

you shouldnt have to do the changes everytiem if you make your own local repository and do a
Code:

git pull https://github.com/EQEMU/Server
from a git enabled command prompt spawned by the git gui client

if there is a conflict due to a recent change - it will complain and you can sort it out right there.

wolfwalkereci 02-26-2014 04:21 PM

Quote:

Originally Posted by Uleat (Post 228536)
I'm running vs2010 on xp..lemme see what happens when I compile..

Was curious if it was a VS2010 issue.

KLS 02-26-2014 05:14 PM

This will be fixed sometime today, sorry.


All times are GMT -4. The time now is 11:32 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.