Makefile can't find cmath

308 views
Skip to first unread message

Kevin

unread,
Nov 4, 2010, 1:11:49 PM11/4/10
to android-ndk
Hi, I'm using the android NDK for the first time. While I'm vaguely
familiar with makefiles, I can't seem to get it to find cmake.

Here is the makefile:

-----------------
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := RakNet
MY_PREFIX := $(LOCAL_PATH)/RakNetSources/
MY_SOURCES := $(wildcard $(MY_PREFIX)/*.cpp)
LOCAL_C_INCLUDES := D:/cygwin/home/Kevin/android-ndk-r4b/build/
platforms/android-8/arch-x86/usr/include
LOCAL_SRC_FILES += RakNetSources/$(MY_SOURCES:$(MY_PREFIX)%=%)
LOCAL_LDLIBS := -lpthread

include $(BUILD_SHARED_LIBRARY)
-----------------

Here is what I am typing:

-----------------
Kevin@Kevin-PC ~/android-ndk-r4b/samples/RakNet
$ ../../ndk-build
Gdbserver : [arm-eabi-4.4.0] /home/Kevin/android-ndk-r4b/samples/
RakNet/lib
s/armeabi/gdbserver
Gdbsetup : /home/Kevin/android-ndk-r4b/samples/RakNet/libs/
armeabi/gdb.set
up
Gdbsetup : + source directory /home/Kevin/android-ndk-r4b/
samples/RakNet/j
ni
Compile++ thumb: RakNet <= /home/Kevin/android-ndk-r4b/samples/RakNet/
jni/RakNet
Sources//BitStream.cpp
/home/Kevin/android-ndk-r4b/samples/RakNet/jni/RakNetSources//
BitStream.cpp:32:1
7: error: cmath: No such file or directory
make: *** [/home/Kevin/android-ndk-r4b/samples/RakNet/obj/local/
armeabi/objs/Rak
Net/RakNetSources//BitStream.o] Error 1
-----------------

The line it is complaining about in the Cpp source file is the third
one here:

#include <arpa/inet.h>
#include <memory.h>
#include <cmath>
#include <float.h>

So it found inet and memory.h, but can't find cmath.

Thanks for the help!

Onur Cinar

unread,
Nov 4, 2010, 1:56:11 PM11/4/10
to andro...@googlegroups.com

Hi Kevin,

Try math.h instead?

-onur


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.


---
www.zdo.com

alan

unread,
Nov 5, 2010, 6:40:09 AM11/5/10
to android-ndk
these two lines are also unnecessary:
LOCAL_C_INCLUDES := D:/cygwin/home/Kevin/android-ndk-r4b/build/
platforms/android-8/arch-x86/usr/include
LOCAL_LDLIBS := -lpthread
> > android-ndk...@googlegroups.com<android-ndk%2Bunsu...@googlegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages