On 9/3/2010 4:13 PM, murkser wrote:
> I have two files in this project.
> The file with the function I want to use in java has *.c (with *.cpp I
> get an error here)
> In this file I start a function from another file (*.cpp) where I want
> to put my C++ code (including str = new char[50]; )
new is a keyword in C++. If the file in question is being built as C++,
there is no way for "new" to be undefined; you can get link errors if it
can't find the proper library, though. Are you saying that the "new
char[50]" appears in a .cpp file? And that the .cpp file is being
included in Android.mk as part of LOCAL_SRC_FILES?
What is the exact error message you're getting? And what does the
compile line look like when you run:
ndk-build V=1
...to get a verbose build?
Tim