AI 149005: Change from ndk to platform's ndk (pndk), the ability to make your own java callable libraries to c code.
BUG=1857858 Automated import of CL 149005
This commit is contained in:
committed by
The Android Open Source Project
parent
c3c7479ab6
commit
429fbd82d8
22
pdk/pndk/samples/sample/hello_cpp.cpp
Normal file
22
pdk/pndk/samples/sample/hello_cpp.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <stdio.h>
|
||||
#include "hello_cpp.h"
|
||||
|
||||
Hello::Hello()
|
||||
{
|
||||
}
|
||||
|
||||
Hello::~Hello()
|
||||
{
|
||||
}
|
||||
|
||||
void Hello::printMessage(char* msg)
|
||||
{
|
||||
printf("C++ example printing message: %s", msg);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
Hello hello_obj;
|
||||
hello_obj.printMessage("Hello world!\n");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user