compiling errors

Shawn Johnson sjohnso at gmail.com
Fri Apr 27 13:51:10 PDT 2007


Hello!

I'm very new to OSX, but familiar with gentoo and other linux distros.  I
seem to have issues compiling various programs on my iMac using macports.  I
get the following errors:

OSPDY:~ sjohnso$ sudo port install atanks
--->  Building atanks with target all
Error: Target com.apple.build returned: shell command "cd
"/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_games_atanks/work/atanks-
1.5a" && CFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make all
PREFIX=/opt/local" returned error 2
Command output: make -C src
g++ -c player.cc -o player.o -DLINUX -DVERSION=\"1.5.0a\"
-DDATA_DIR=\"/opt/local/share/atanks\"   -I/opt/local/include -Wall
-Iinclude  -g
player.cc: In member function 'int PLAYER::addTankDamageToMatrix(TANK*,
TANK*, int)':
player.cc:1041: error: call of overloaded 'abs(double)' is ambiguous
/usr/include/stdlib.h:145: note: candidates are: int abs(int)
/usr/include/c++/4.0.0/cstdlib:169: note:                 long long int
__gnu_cxx::abs(long long int)
/usr/include/c++/4.0.0/cstdlib:130: note:                 long int
std::abs(long int)
player.cc:1046: error: call of overloaded 'abs(double)' is ambiguous
/usr/include/stdlib.h:145: note: candidates are: int abs(int)
/usr/include/c++/4.0.0/cstdlib:169: note:                 long long int
__gnu_cxx::abs(long long int)
/usr/include/c++/4.0.0/cstdlib:130: note:                 long int
std::abs(long int)
player.cc: In member function 'void PLAYER::calcDamageMatrix(TANK*, int)':
player.cc:1140: error: call of overloaded 'abs(double)' is ambiguous
/usr/include/stdlib.h:145: note: candidates are: int abs(int)
/usr/include/c++/4.0.0/cstdlib:169: note:                 long long int
__gnu_cxx::abs(long long int)
/usr/include/c++/4.0.0/cstdlib:130: note:                 long int
std::abs(long int)
make[1]: *** [player.o] Error 1
make: *** [all] Error 2

Error: Status 1 encountered during processing.

Can anyone give me any advice on what's going on here and perhaps point me
to a solution?

Thanks for your help!

Shawn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-users/attachments/20070427/b3b92ae7/attachment.html


More information about the macports-users mailing list