VOGONS


First post, by justin2005

User metadata
Rank Newbie
Rank
Newbie

Hi All:

I have tried to install "SDL-1.2.8" and "dosbox-0.63"
in Sun Sparc Solaris 8 system, but meet the following
errors when installed dosbox:
---------------------------------------------------------------------------------------------------------------------------
g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include
-I/home/rathlefs/local/dosbox/include/SDL -D_REENTRANT
-g -O2 -c -o mixer.o mixer.cpp
mixer.cpp: In method `void MIXER::MakeVolume(char *,
float &, float &)':
mixer.cpp:392: implicit declaration of function `int
powf(...)'
make[3]: *** [mixer.o] Error 1
make[3]: Leaving directory
`/home/rathlefs/users/justin/dosbox/dosbox-0.63/src/hardware'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/home/rathlefs/users/justin/dosbox/dosbox-0.63/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/rathlefs/users/justin/dosbox/dosbox-0.63'
make: *** [all] Error 2
--------------------------------------------------------------------------------------------------------------

Could you give me some suggestions?

thanks,

Justin

Reply 2 of 2, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

It's unlikely that your system is missing powf itself - it's part of numerous C standards, including POSIX and C99. I guess you are missing the header where it is declared.

Try adding the line

       float powf(float x, float y);

to src/hardware/mixer.cpp and recompile. This is of course a workaround - If you're interested in a real solution, you should find out where powf() is declared, and why it's not available via math.h, perhaps a compiler setting (some compilers need a special flag to turn on POSIX or C99 compatibility) or a missing software package or somesuch.