diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/Android/.classpath b/Android/.classpath new file mode 100644 index 0000000..2731f9c --- /dev/null +++ b/Android/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Android/.cproject b/Android/.cproject new file mode 100644 index 0000000..fe52b1f --- /dev/null +++ b/Android/.cproject @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android/.project b/Android/.project new file mode 100644 index 0000000..31e1b1a --- /dev/null +++ b/Android/.project @@ -0,0 +1,56 @@ + + + HelloCpp + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + jni/CPP + 2 + /Users/ademar/gits/testes/DosesCpp/HelloCpp/CPP + + + diff --git a/Android/AndroidManifest.xml b/Android/AndroidManifest.xml new file mode 100644 index 0000000..5f9c546 --- /dev/null +++ b/Android/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + diff --git a/Android/bin/AndroidManifest.xml b/Android/bin/AndroidManifest.xml new file mode 100644 index 0000000..5f9c546 --- /dev/null +++ b/Android/bin/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + diff --git a/Android/bin/HelloCpp.apk b/Android/bin/HelloCpp.apk new file mode 100644 index 0000000..2b32737 Binary files /dev/null and b/Android/bin/HelloCpp.apk differ diff --git a/Android/bin/classes.dex b/Android/bin/classes.dex new file mode 100644 index 0000000..d402a26 Binary files /dev/null and b/Android/bin/classes.dex differ diff --git a/Android/bin/classes/la/jurema/doses/hellocpp/BuildConfig.class b/Android/bin/classes/la/jurema/doses/hellocpp/BuildConfig.class new file mode 100644 index 0000000..680f11d Binary files /dev/null and b/Android/bin/classes/la/jurema/doses/hellocpp/BuildConfig.class differ diff --git a/Android/bin/classes/la/jurema/doses/hellocpp/MainActivity.class b/Android/bin/classes/la/jurema/doses/hellocpp/MainActivity.class new file mode 100644 index 0000000..e20f91e Binary files /dev/null and b/Android/bin/classes/la/jurema/doses/hellocpp/MainActivity.class differ diff --git a/Android/bin/classes/la/jurema/doses/hellocpp/R$attr.class b/Android/bin/classes/la/jurema/doses/hellocpp/R$attr.class new file mode 100644 index 0000000..6392e06 Binary files /dev/null and b/Android/bin/classes/la/jurema/doses/hellocpp/R$attr.class differ diff --git a/Android/bin/classes/la/jurema/doses/hellocpp/R$drawable.class b/Android/bin/classes/la/jurema/doses/hellocpp/R$drawable.class new file mode 100644 index 0000000..a0e2f75 Binary files /dev/null and b/Android/bin/classes/la/jurema/doses/hellocpp/R$drawable.class differ diff --git a/Android/bin/classes/la/jurema/doses/hellocpp/R$string.class b/Android/bin/classes/la/jurema/doses/hellocpp/R$string.class new file mode 100644 index 0000000..219b697 Binary files /dev/null and b/Android/bin/classes/la/jurema/doses/hellocpp/R$string.class differ diff --git a/Android/bin/classes/la/jurema/doses/hellocpp/R.class b/Android/bin/classes/la/jurema/doses/hellocpp/R.class new file mode 100644 index 0000000..f189de2 Binary files /dev/null and b/Android/bin/classes/la/jurema/doses/hellocpp/R.class differ diff --git a/Android/bin/dexedLibs/android-support-v4-56d1575cbab10cb81601b99dee1ba624.jar b/Android/bin/dexedLibs/android-support-v4-56d1575cbab10cb81601b99dee1ba624.jar new file mode 100644 index 0000000..38a27f5 Binary files /dev/null and b/Android/bin/dexedLibs/android-support-v4-56d1575cbab10cb81601b99dee1ba624.jar differ diff --git a/Android/bin/jarlist.cache b/Android/bin/jarlist.cache new file mode 100644 index 0000000..0565465 --- /dev/null +++ b/Android/bin/jarlist.cache @@ -0,0 +1,3 @@ +# cache for current jar dependency. DO NOT EDIT. +# format is +# Encoding is UTF-8 diff --git a/Android/bin/res/drawable/ic_launcher.png b/Android/bin/res/drawable/ic_launcher.png new file mode 100644 index 0000000..0493b25 Binary files /dev/null and b/Android/bin/res/drawable/ic_launcher.png differ diff --git a/Android/bin/resources.ap_ b/Android/bin/resources.ap_ new file mode 100644 index 0000000..35a50e2 Binary files /dev/null and b/Android/bin/resources.ap_ differ diff --git a/Android/gen/la/jurema/doses/hellocpp/BuildConfig.java b/Android/gen/la/jurema/doses/hellocpp/BuildConfig.java new file mode 100644 index 0000000..0988524 --- /dev/null +++ b/Android/gen/la/jurema/doses/hellocpp/BuildConfig.java @@ -0,0 +1,6 @@ +/** Automatically generated file. DO NOT MODIFY */ +package la.jurema.doses.hellocpp; + +public final class BuildConfig { + public final static boolean DEBUG = true; +} \ No newline at end of file diff --git a/Android/gen/la/jurema/doses/hellocpp/R.java b/Android/gen/la/jurema/doses/hellocpp/R.java new file mode 100644 index 0000000..1744541 --- /dev/null +++ b/Android/gen/la/jurema/doses/hellocpp/R.java @@ -0,0 +1,19 @@ +/* AUTO-GENERATED FILE. DO NOT MODIFY. + * + * This class was automatically generated by the + * aapt tool from the resource data it found. It + * should not be modified by hand. + */ + +package la.jurema.doses.hellocpp; + +public final class R { + public static final class attr { + } + public static final class drawable { + public static final int ic_launcher=0x7f020000; + } + public static final class string { + public static final int app_name=0x7f030000; + } +} diff --git a/Android/ic_launcher-web.png b/Android/ic_launcher-web.png new file mode 100644 index 0000000..4018ad3 Binary files /dev/null and b/Android/ic_launcher-web.png differ diff --git a/Android/jni/Android.mk b/Android/jni/Android.mk new file mode 100644 index 0000000..7fb1b27 --- /dev/null +++ b/Android/jni/Android.mk @@ -0,0 +1,11 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := HelloCpp +LOCAL_SRC_FILES := CoreWrapper.cpp +LOCAL_SRC_FILES += ../../CPP/Core.cpp + +LOCAL_C_INCLUDES := $(LOCAL_PATH)../../CPP/ + +include $(BUILD_SHARED_LIBRARY) diff --git a/Android/jni/Application.mk b/Android/jni/Application.mk new file mode 100644 index 0000000..325efaf --- /dev/null +++ b/Android/jni/Application.mk @@ -0,0 +1,2 @@ +APP_STL := gnustl_static +APP_ABI := all \ No newline at end of file diff --git a/Android/jni/CoreWrapper.cpp b/Android/jni/CoreWrapper.cpp new file mode 100644 index 0000000..8c3f55b --- /dev/null +++ b/Android/jni/CoreWrapper.cpp @@ -0,0 +1,19 @@ +// +// CoreWrapper.c +// HelloCpp +// +// Created by Ademar Alves de Oliveira on 5/28/13. +// Copyright (c) 2013 Jurema. All rights reserved. +// + +#include +#include +#include "../../CPP/Core.h" + +extern "C" { + +JNIEXPORT jstring JNICALL Java_la_jurema_doses_hellocpp_MainActivity_concateneMyStringWithCppString(JNIEnv* env, jobject thiz, jstring myString) { + return env->NewStringUTF(concateneMyStringWithCppString(env->GetStringUTFChars(myString, 0))); +} + +} diff --git a/Android/libs/android-support-v4.jar b/Android/libs/android-support-v4.jar new file mode 100644 index 0000000..428bdbc Binary files /dev/null and b/Android/libs/android-support-v4.jar differ diff --git a/Android/libs/armeabi-v7a/libHelloCpp.so b/Android/libs/armeabi-v7a/libHelloCpp.so new file mode 100755 index 0000000..a240c9c Binary files /dev/null and b/Android/libs/armeabi-v7a/libHelloCpp.so differ diff --git a/Android/libs/armeabi/libHelloCpp.so b/Android/libs/armeabi/libHelloCpp.so new file mode 100755 index 0000000..60e2521 Binary files /dev/null and b/Android/libs/armeabi/libHelloCpp.so differ diff --git a/Android/libs/mips/libHelloCpp.so b/Android/libs/mips/libHelloCpp.so new file mode 100755 index 0000000..14c1de7 Binary files /dev/null and b/Android/libs/mips/libHelloCpp.so differ diff --git a/Android/libs/x86/libHelloCpp.so b/Android/libs/x86/libHelloCpp.so new file mode 100755 index 0000000..d428a62 Binary files /dev/null and b/Android/libs/x86/libHelloCpp.so differ diff --git a/Android/obj/local/armeabi-v7a/libHelloCpp.so b/Android/obj/local/armeabi-v7a/libHelloCpp.so new file mode 100755 index 0000000..5293454 Binary files /dev/null and b/Android/obj/local/armeabi-v7a/libHelloCpp.so differ diff --git a/Android/obj/local/armeabi-v7a/objs/HelloCpp/CoreWrapper.o b/Android/obj/local/armeabi-v7a/objs/HelloCpp/CoreWrapper.o new file mode 100644 index 0000000..3ed88b5 Binary files /dev/null and b/Android/obj/local/armeabi-v7a/objs/HelloCpp/CoreWrapper.o differ diff --git a/Android/obj/local/armeabi-v7a/objs/HelloCpp/CoreWrapper.o.d b/Android/obj/local/armeabi-v7a/objs/HelloCpp/CoreWrapper.o.d new file mode 100644 index 0000000..6e32247 --- /dev/null +++ b/Android/obj/local/armeabi-v7a/objs/HelloCpp/CoreWrapper.o.d @@ -0,0 +1,26 @@ +/Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/obj/local/armeabi-v7a/objs/HelloCpp/CoreWrapper.o: \ + /Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/CoreWrapper.cpp \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/string.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/sys/cdefs.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/sys/cdefs_elf.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/android/api-level.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/malloc.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/jni.h \ + /Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.h \ + /Users/ademar/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/iostream + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/string.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/sys/cdefs.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/sys/cdefs_elf.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/android/api-level.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/malloc.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/jni.h: + +/Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.h: + +/Users/ademar/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/iostream: diff --git a/Android/obj/local/armeabi-v7a/objs/HelloCpp/__/__/CPP/Core.o b/Android/obj/local/armeabi-v7a/objs/HelloCpp/__/__/CPP/Core.o new file mode 100644 index 0000000..45de9a8 Binary files /dev/null and b/Android/obj/local/armeabi-v7a/objs/HelloCpp/__/__/CPP/Core.o differ diff --git a/Android/obj/local/armeabi-v7a/objs/HelloCpp/__/__/CPP/Core.o.d b/Android/obj/local/armeabi-v7a/objs/HelloCpp/__/__/CPP/Core.o.d new file mode 100644 index 0000000..39e5698 --- /dev/null +++ b/Android/obj/local/armeabi-v7a/objs/HelloCpp/__/__/CPP/Core.o.d @@ -0,0 +1,8 @@ +/Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/obj/local/armeabi-v7a/objs/HelloCpp/__/__/CPP/Core.o: \ + /Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.cpp \ + /Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.h \ + /Users/ademar/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/iostream + +/Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.h: + +/Users/ademar/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/iostream: diff --git a/Android/obj/local/armeabi/libHelloCpp.so b/Android/obj/local/armeabi/libHelloCpp.so new file mode 100755 index 0000000..9246fd5 Binary files /dev/null and b/Android/obj/local/armeabi/libHelloCpp.so differ diff --git a/Android/obj/local/armeabi/objs/HelloCpp/CoreWrapper.o b/Android/obj/local/armeabi/objs/HelloCpp/CoreWrapper.o new file mode 100644 index 0000000..6130747 Binary files /dev/null and b/Android/obj/local/armeabi/objs/HelloCpp/CoreWrapper.o differ diff --git a/Android/obj/local/armeabi/objs/HelloCpp/CoreWrapper.o.d b/Android/obj/local/armeabi/objs/HelloCpp/CoreWrapper.o.d new file mode 100644 index 0000000..0a6c2ed --- /dev/null +++ b/Android/obj/local/armeabi/objs/HelloCpp/CoreWrapper.o.d @@ -0,0 +1,26 @@ +/Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/obj/local/armeabi/objs/HelloCpp/CoreWrapper.o: \ + /Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/CoreWrapper.cpp \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/string.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/sys/cdefs.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/sys/cdefs_elf.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/android/api-level.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/malloc.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/jni.h \ + /Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.h \ + /Users/ademar/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/iostream + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/string.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/sys/cdefs.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/sys/cdefs_elf.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/android/api-level.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/malloc.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-arm/usr/include/jni.h: + +/Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.h: + +/Users/ademar/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/iostream: diff --git a/Android/obj/local/armeabi/objs/HelloCpp/__/__/CPP/Core.o b/Android/obj/local/armeabi/objs/HelloCpp/__/__/CPP/Core.o new file mode 100644 index 0000000..7fbe80d Binary files /dev/null and b/Android/obj/local/armeabi/objs/HelloCpp/__/__/CPP/Core.o differ diff --git a/Android/obj/local/armeabi/objs/HelloCpp/__/__/CPP/Core.o.d b/Android/obj/local/armeabi/objs/HelloCpp/__/__/CPP/Core.o.d new file mode 100644 index 0000000..4c195ff --- /dev/null +++ b/Android/obj/local/armeabi/objs/HelloCpp/__/__/CPP/Core.o.d @@ -0,0 +1,8 @@ +/Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/obj/local/armeabi/objs/HelloCpp/__/__/CPP/Core.o: \ + /Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.cpp \ + /Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.h \ + /Users/ademar/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/iostream + +/Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.h: + +/Users/ademar/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/iostream: diff --git a/Android/obj/local/mips/libHelloCpp.so b/Android/obj/local/mips/libHelloCpp.so new file mode 100755 index 0000000..56888b3 Binary files /dev/null and b/Android/obj/local/mips/libHelloCpp.so differ diff --git a/Android/obj/local/mips/objs/HelloCpp/CoreWrapper.o b/Android/obj/local/mips/objs/HelloCpp/CoreWrapper.o new file mode 100644 index 0000000..5f86a80 Binary files /dev/null and b/Android/obj/local/mips/objs/HelloCpp/CoreWrapper.o differ diff --git a/Android/obj/local/mips/objs/HelloCpp/CoreWrapper.o.d b/Android/obj/local/mips/objs/HelloCpp/CoreWrapper.o.d new file mode 100644 index 0000000..ed8c828 --- /dev/null +++ b/Android/obj/local/mips/objs/HelloCpp/CoreWrapper.o.d @@ -0,0 +1,26 @@ +/Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/obj/local/mips/objs/HelloCpp/CoreWrapper.o: \ + /Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/CoreWrapper.cpp \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-mips/usr/include/string.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-mips/usr/include/sys/cdefs.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-mips/usr/include/sys/cdefs_elf.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-mips/usr/include/android/api-level.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-mips/usr/include/malloc.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-mips/usr/include/jni.h \ + /Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.h \ + /Users/ademar/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/iostream + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-mips/usr/include/string.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-mips/usr/include/sys/cdefs.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-mips/usr/include/sys/cdefs_elf.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-mips/usr/include/android/api-level.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-mips/usr/include/malloc.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-mips/usr/include/jni.h: + +/Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.h: + +/Users/ademar/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/iostream: diff --git a/Android/obj/local/mips/objs/HelloCpp/__/__/CPP/Core.o b/Android/obj/local/mips/objs/HelloCpp/__/__/CPP/Core.o new file mode 100644 index 0000000..812c81a Binary files /dev/null and b/Android/obj/local/mips/objs/HelloCpp/__/__/CPP/Core.o differ diff --git a/Android/obj/local/mips/objs/HelloCpp/__/__/CPP/Core.o.d b/Android/obj/local/mips/objs/HelloCpp/__/__/CPP/Core.o.d new file mode 100644 index 0000000..fa0ec31 --- /dev/null +++ b/Android/obj/local/mips/objs/HelloCpp/__/__/CPP/Core.o.d @@ -0,0 +1,8 @@ +/Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/obj/local/mips/objs/HelloCpp/__/__/CPP/Core.o: \ + /Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.cpp \ + /Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.h \ + /Users/ademar/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/iostream + +/Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.h: + +/Users/ademar/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/iostream: diff --git a/Android/obj/local/x86/libHelloCpp.so b/Android/obj/local/x86/libHelloCpp.so new file mode 100755 index 0000000..47e8dfe Binary files /dev/null and b/Android/obj/local/x86/libHelloCpp.so differ diff --git a/Android/obj/local/x86/objs/HelloCpp/CoreWrapper.o b/Android/obj/local/x86/objs/HelloCpp/CoreWrapper.o new file mode 100644 index 0000000..c79c4b9 Binary files /dev/null and b/Android/obj/local/x86/objs/HelloCpp/CoreWrapper.o differ diff --git a/Android/obj/local/x86/objs/HelloCpp/CoreWrapper.o.d b/Android/obj/local/x86/objs/HelloCpp/CoreWrapper.o.d new file mode 100644 index 0000000..8b114a0 --- /dev/null +++ b/Android/obj/local/x86/objs/HelloCpp/CoreWrapper.o.d @@ -0,0 +1,26 @@ +/Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/obj/local/x86/objs/HelloCpp/CoreWrapper.o: \ + /Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/CoreWrapper.cpp \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-x86/usr/include/string.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-x86/usr/include/sys/cdefs.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-x86/usr/include/sys/cdefs_elf.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-x86/usr/include/android/api-level.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-x86/usr/include/malloc.h \ + /Users/ademar/android-ndk-r8e/platforms/android-14/arch-x86/usr/include/jni.h \ + /Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.h \ + /Users/ademar/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/iostream + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-x86/usr/include/string.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-x86/usr/include/sys/cdefs.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-x86/usr/include/sys/cdefs_elf.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-x86/usr/include/android/api-level.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-x86/usr/include/malloc.h: + +/Users/ademar/android-ndk-r8e/platforms/android-14/arch-x86/usr/include/jni.h: + +/Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.h: + +/Users/ademar/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/iostream: diff --git a/Android/obj/local/x86/objs/HelloCpp/__/__/CPP/Core.o b/Android/obj/local/x86/objs/HelloCpp/__/__/CPP/Core.o new file mode 100644 index 0000000..7312dbc Binary files /dev/null and b/Android/obj/local/x86/objs/HelloCpp/__/__/CPP/Core.o differ diff --git a/Android/obj/local/x86/objs/HelloCpp/__/__/CPP/Core.o.d b/Android/obj/local/x86/objs/HelloCpp/__/__/CPP/Core.o.d new file mode 100644 index 0000000..6d6a73a --- /dev/null +++ b/Android/obj/local/x86/objs/HelloCpp/__/__/CPP/Core.o.d @@ -0,0 +1,8 @@ +/Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/obj/local/x86/objs/HelloCpp/__/__/CPP/Core.o: \ + /Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.cpp \ + /Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.h \ + /Users/ademar/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/iostream + +/Users/ademar/gits/testes/DosesCpp/HelloCpp/Android/jni/../../CPP/Core.h: + +/Users/ademar/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/iostream: diff --git a/Android/proguard-project.txt b/Android/proguard-project.txt new file mode 100644 index 0000000..f2fe155 --- /dev/null +++ b/Android/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/Android/project.properties b/Android/project.properties new file mode 100644 index 0000000..a3ee5ab --- /dev/null +++ b/Android/project.properties @@ -0,0 +1,14 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-17 diff --git a/Android/res/drawable/ic_launcher.png b/Android/res/drawable/ic_launcher.png new file mode 100644 index 0000000..9f72969 Binary files /dev/null and b/Android/res/drawable/ic_launcher.png differ diff --git a/Android/res/values/strings.xml b/Android/res/values/strings.xml new file mode 100644 index 0000000..df84507 --- /dev/null +++ b/Android/res/values/strings.xml @@ -0,0 +1,6 @@ + + + + HelloCpp + + diff --git a/Android/src/la/jurema/doses/hellocpp/MainActivity.java b/Android/src/la/jurema/doses/hellocpp/MainActivity.java new file mode 100644 index 0000000..c2b4f48 --- /dev/null +++ b/Android/src/la/jurema/doses/hellocpp/MainActivity.java @@ -0,0 +1,35 @@ +package la.jurema.doses.hellocpp; + +import android.app.Activity; +import android.graphics.Color; +import android.os.Bundle; +import android.view.Gravity; +import android.widget.TextView; + +/** + * @author Ademar Alves de Oliveira + * @May 28, 2013 + * @email ademar111190@gmail.com + */ +public class MainActivity extends Activity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + TextView textView = new TextView(getApplicationContext()); + textView.setText(concateneMyStringWithCppString("Javaaaa")); + setContentView(textView); + + //perfumaria + textView.setTextSize(50); + textView.setTextColor(Color.BLACK); + textView.setGravity(Gravity.CENTER); + } + + private native String concateneMyStringWithCppString(String myString); + + static { + System.loadLibrary("HelloCpp"); + } + +} diff --git a/CPP/Core.cpp b/CPP/Core.cpp new file mode 100644 index 0000000..3e696e8 --- /dev/null +++ b/CPP/Core.cpp @@ -0,0 +1,17 @@ +// +// Core.cpp +// HelloCpp +// +// Created by Ademar Alves de Oliveira on 5/28/13. +// Copyright (c) 2013 Jurema. All rights reserved. +// + +#include "Core.h" + +const char* CPP_BASE_STRING = "cpp says hello world to %s"; + +const char* concateneMyStringWithCppString(const char* myString) { + char* concatenedString = new char[strlen(CPP_BASE_STRING) + strlen(myString)]; + sprintf(concatenedString, CPP_BASE_STRING, myString); + return concatenedString; +} \ No newline at end of file diff --git a/CPP/Core.h b/CPP/Core.h new file mode 100644 index 0000000..11c5646 --- /dev/null +++ b/CPP/Core.h @@ -0,0 +1,16 @@ +// +// Core.h +// HelloCpp +// +// Created by Ademar Alves de Oliveira on 5/28/13. +// Copyright (c) 2013 Jurema. All rights reserved. +// + +#ifndef __HelloCpp__Core__ +#define __HelloCpp__Core__ + +#include + +const char* concateneMyStringWithCppString(const char* myString); + +#endif /* defined(__HelloCpp__Core__) */ diff --git a/HelloCpp.xcodeproj/project.pbxproj b/HelloCpp.xcodeproj/project.pbxproj new file mode 100644 index 0000000..44802dc --- /dev/null +++ b/HelloCpp.xcodeproj/project.pbxproj @@ -0,0 +1,330 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 542F43FE1754F8B300F7B9E5 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 542F43FD1754F8B300F7B9E5 /* UIKit.framework */; }; + 542F44001754F8B300F7B9E5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 542F43FF1754F8B300F7B9E5 /* Foundation.framework */; }; + 542F44021754F8B300F7B9E5 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 542F44011754F8B300F7B9E5 /* CoreGraphics.framework */; }; + 542F44081754F8B300F7B9E5 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 542F44061754F8B300F7B9E5 /* InfoPlist.strings */; }; + 542F440A1754F8B300F7B9E5 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 542F44091754F8B300F7B9E5 /* main.m */; }; + 542F440E1754F8B300F7B9E5 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 542F440D1754F8B300F7B9E5 /* AppDelegate.mm */; }; + 542F44101754F8B300F7B9E5 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 542F440F1754F8B300F7B9E5 /* Default.png */; }; + 542F44121754F8B300F7B9E5 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 542F44111754F8B300F7B9E5 /* Default@2x.png */; }; + 542F44141754F8B300F7B9E5 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 542F44131754F8B300F7B9E5 /* Default-568h@2x.png */; }; + 542F44171754F8B300F7B9E5 /* ViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 542F44161754F8B300F7B9E5 /* ViewController.mm */; }; + 542F442E1754FD2900F7B9E5 /* CoreWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 542F442D1754FD2900F7B9E5 /* CoreWrapper.mm */; }; + 542F44301754FEFD00F7B9E5 /* libstdc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 542F442F1754FEFD00F7B9E5 /* libstdc++.dylib */; }; + 542F4436175502FF00F7B9E5 /* Core.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 542F4434175502FF00F7B9E5 /* Core.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 542F43FA1754F8B300F7B9E5 /* HelloCpp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloCpp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 542F43FD1754F8B300F7B9E5 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 542F43FF1754F8B300F7B9E5 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 542F44011754F8B300F7B9E5 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 542F44051754F8B300F7B9E5 /* HelloCpp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "HelloCpp-Info.plist"; sourceTree = ""; }; + 542F44071754F8B300F7B9E5 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 542F44091754F8B300F7B9E5 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 542F440B1754F8B300F7B9E5 /* HelloCpp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HelloCpp-Prefix.pch"; sourceTree = ""; }; + 542F440C1754F8B300F7B9E5 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 542F440D1754F8B300F7B9E5 /* AppDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AppDelegate.mm; sourceTree = ""; }; + 542F440F1754F8B300F7B9E5 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + 542F44111754F8B300F7B9E5 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + 542F44131754F8B300F7B9E5 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 542F44151754F8B300F7B9E5 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 542F44161754F8B300F7B9E5 /* ViewController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ViewController.mm; sourceTree = ""; }; + 542F442C1754FD2900F7B9E5 /* CoreWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreWrapper.h; sourceTree = ""; }; + 542F442D1754FD2900F7B9E5 /* CoreWrapper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CoreWrapper.mm; sourceTree = ""; }; + 542F442F1754FEFD00F7B9E5 /* libstdc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libstdc++.dylib"; path = "usr/lib/libstdc++.dylib"; sourceTree = SDKROOT; }; + 542F4434175502FF00F7B9E5 /* Core.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Core.cpp; sourceTree = ""; }; + 542F4435175502FF00F7B9E5 /* Core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Core.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 542F43F71754F8B300F7B9E5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 542F44301754FEFD00F7B9E5 /* libstdc++.dylib in Frameworks */, + 542F43FE1754F8B300F7B9E5 /* UIKit.framework in Frameworks */, + 542F44001754F8B300F7B9E5 /* Foundation.framework in Frameworks */, + 542F44021754F8B300F7B9E5 /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 542F43F11754F8B200F7B9E5 = { + isa = PBXGroup; + children = ( + 542F44031754F8B300F7B9E5 /* HelloCpp */, + 542F43FC1754F8B300F7B9E5 /* Frameworks */, + 542F43FB1754F8B300F7B9E5 /* Products */, + ); + sourceTree = ""; + }; + 542F43FB1754F8B300F7B9E5 /* Products */ = { + isa = PBXGroup; + children = ( + 542F43FA1754F8B300F7B9E5 /* HelloCpp.app */, + ); + name = Products; + sourceTree = ""; + }; + 542F43FC1754F8B300F7B9E5 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 542F442F1754FEFD00F7B9E5 /* libstdc++.dylib */, + 542F43FD1754F8B300F7B9E5 /* UIKit.framework */, + 542F43FF1754F8B300F7B9E5 /* Foundation.framework */, + 542F44011754F8B300F7B9E5 /* CoreGraphics.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 542F44031754F8B300F7B9E5 /* HelloCpp */ = { + isa = PBXGroup; + children = ( + 542F4433175502FF00F7B9E5 /* CPP */, + 542F442B1754FD0000F7B9E5 /* Wrapper */, + 542F440C1754F8B300F7B9E5 /* AppDelegate.h */, + 542F440D1754F8B300F7B9E5 /* AppDelegate.mm */, + 542F44151754F8B300F7B9E5 /* ViewController.h */, + 542F44161754F8B300F7B9E5 /* ViewController.mm */, + 542F44041754F8B300F7B9E5 /* Supporting Files */, + ); + path = HelloCpp; + sourceTree = ""; + }; + 542F44041754F8B300F7B9E5 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 542F44051754F8B300F7B9E5 /* HelloCpp-Info.plist */, + 542F44061754F8B300F7B9E5 /* InfoPlist.strings */, + 542F44091754F8B300F7B9E5 /* main.m */, + 542F440B1754F8B300F7B9E5 /* HelloCpp-Prefix.pch */, + 542F440F1754F8B300F7B9E5 /* Default.png */, + 542F44111754F8B300F7B9E5 /* Default@2x.png */, + 542F44131754F8B300F7B9E5 /* Default-568h@2x.png */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 542F442B1754FD0000F7B9E5 /* Wrapper */ = { + isa = PBXGroup; + children = ( + 542F442C1754FD2900F7B9E5 /* CoreWrapper.h */, + 542F442D1754FD2900F7B9E5 /* CoreWrapper.mm */, + ); + path = Wrapper; + sourceTree = ""; + }; + 542F4433175502FF00F7B9E5 /* CPP */ = { + isa = PBXGroup; + children = ( + 542F4434175502FF00F7B9E5 /* Core.cpp */, + 542F4435175502FF00F7B9E5 /* Core.h */, + ); + path = CPP; + sourceTree = SOURCE_ROOT; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 542F43F91754F8B300F7B9E5 /* HelloCpp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 542F44201754F8B300F7B9E5 /* Build configuration list for PBXNativeTarget "HelloCpp" */; + buildPhases = ( + 542F43F61754F8B300F7B9E5 /* Sources */, + 542F43F71754F8B300F7B9E5 /* Frameworks */, + 542F43F81754F8B300F7B9E5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HelloCpp; + productName = HelloCpp; + productReference = 542F43FA1754F8B300F7B9E5 /* HelloCpp.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 542F43F21754F8B200F7B9E5 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0460; + ORGANIZATIONNAME = Jurema; + }; + buildConfigurationList = 542F43F51754F8B200F7B9E5 /* Build configuration list for PBXProject "HelloCpp" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 542F43F11754F8B200F7B9E5; + productRefGroup = 542F43FB1754F8B300F7B9E5 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 542F43F91754F8B300F7B9E5 /* HelloCpp */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 542F43F81754F8B300F7B9E5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 542F44081754F8B300F7B9E5 /* InfoPlist.strings in Resources */, + 542F44101754F8B300F7B9E5 /* Default.png in Resources */, + 542F44121754F8B300F7B9E5 /* Default@2x.png in Resources */, + 542F44141754F8B300F7B9E5 /* Default-568h@2x.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 542F43F61754F8B300F7B9E5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 542F440A1754F8B300F7B9E5 /* main.m in Sources */, + 542F440E1754F8B300F7B9E5 /* AppDelegate.mm in Sources */, + 542F44171754F8B300F7B9E5 /* ViewController.mm in Sources */, + 542F442E1754FD2900F7B9E5 /* CoreWrapper.mm in Sources */, + 542F4436175502FF00F7B9E5 /* Core.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 542F44061754F8B300F7B9E5 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 542F44071754F8B300F7B9E5 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 542F441E1754F8B300F7B9E5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libstdc++"; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_INPUT_FILETYPE = automatic; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 6.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 542F441F1754F8B300F7B9E5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libstdc++"; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_INPUT_FILETYPE = automatic; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 6.1; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 542F44211754F8B300F7B9E5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LIBRARY = "libstdc++"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "HelloCpp/HelloCpp-Prefix.pch"; + INFOPLIST_FILE = "HelloCpp/HelloCpp-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 542F44221754F8B300F7B9E5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LIBRARY = "libstdc++"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "HelloCpp/HelloCpp-Prefix.pch"; + INFOPLIST_FILE = "HelloCpp/HelloCpp-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 542F43F51754F8B200F7B9E5 /* Build configuration list for PBXProject "HelloCpp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 542F441E1754F8B300F7B9E5 /* Debug */, + 542F441F1754F8B300F7B9E5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 542F44201754F8B300F7B9E5 /* Build configuration list for PBXNativeTarget "HelloCpp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 542F44211754F8B300F7B9E5 /* Debug */, + 542F44221754F8B300F7B9E5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 542F43F21754F8B200F7B9E5 /* Project object */; +} diff --git a/HelloCpp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/HelloCpp.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..94894d6 --- /dev/null +++ b/HelloCpp.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/HelloCpp.xcodeproj/project.xcworkspace/xcuserdata/ademar.xcuserdatad/UserInterfaceState.xcuserstate b/HelloCpp.xcodeproj/project.xcworkspace/xcuserdata/ademar.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..741820e Binary files /dev/null and b/HelloCpp.xcodeproj/project.xcworkspace/xcuserdata/ademar.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/HelloCpp.xcodeproj/xcuserdata/ademar.xcuserdatad/xcschemes/HelloCpp.xcscheme b/HelloCpp.xcodeproj/xcuserdata/ademar.xcuserdatad/xcschemes/HelloCpp.xcscheme new file mode 100644 index 0000000..f6dabf7 --- /dev/null +++ b/HelloCpp.xcodeproj/xcuserdata/ademar.xcuserdatad/xcschemes/HelloCpp.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HelloCpp.xcodeproj/xcuserdata/ademar.xcuserdatad/xcschemes/xcschememanagement.plist b/HelloCpp.xcodeproj/xcuserdata/ademar.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6042251 --- /dev/null +++ b/HelloCpp.xcodeproj/xcuserdata/ademar.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + HelloCpp.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 542F43F91754F8B300F7B9E5 + + primary + + + + + diff --git a/HelloCpp/AppDelegate.h b/HelloCpp/AppDelegate.h new file mode 100644 index 0000000..e5ccedc --- /dev/null +++ b/HelloCpp/AppDelegate.h @@ -0,0 +1,19 @@ +// +// AppDelegate.h +// HelloCpp +// +// Created by Ademar Alves de Oliveira on 5/28/13. +// Copyright (c) 2013 Jurema. All rights reserved. +// + +#import + +@class ViewController; + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@property (strong, nonatomic) ViewController *viewController; + +@end diff --git a/HelloCpp/AppDelegate.mm b/HelloCpp/AppDelegate.mm new file mode 100644 index 0000000..19b21fb --- /dev/null +++ b/HelloCpp/AppDelegate.mm @@ -0,0 +1,32 @@ +// +// AppDelegate.m +// HelloCpp +// +// Created by Ademar Alves de Oliveira on 5/28/13. +// Copyright (c) 2013 Jurema. All rights reserved. +// + +#import "AppDelegate.h" + +#import "ViewController.h" + +@implementation AppDelegate + +- (void)dealloc +{ + [_window release]; + [_viewController release]; + [super dealloc]; +} + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; + self.viewController = [[ViewController new] autorelease]; + self.window.rootViewController = self.viewController; + [self.window setBackgroundColor:[UIColor whiteColor]]; + [self.window makeKeyAndVisible]; + return YES; +} + +@end diff --git a/HelloCpp/Default-568h@2x.png b/HelloCpp/Default-568h@2x.png new file mode 100644 index 0000000..0891b7a Binary files /dev/null and b/HelloCpp/Default-568h@2x.png differ diff --git a/HelloCpp/Default.png b/HelloCpp/Default.png new file mode 100644 index 0000000..4c8ca6f Binary files /dev/null and b/HelloCpp/Default.png differ diff --git a/HelloCpp/Default@2x.png b/HelloCpp/Default@2x.png new file mode 100644 index 0000000..35b84cf Binary files /dev/null and b/HelloCpp/Default@2x.png differ diff --git a/HelloCpp/HelloCpp-Info.plist b/HelloCpp/HelloCpp-Info.plist new file mode 100644 index 0000000..c945d28 --- /dev/null +++ b/HelloCpp/HelloCpp-Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + la.jurema.doses.hellocpp.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/HelloCpp/HelloCpp-Prefix.pch b/HelloCpp/HelloCpp-Prefix.pch new file mode 100644 index 0000000..6faff11 --- /dev/null +++ b/HelloCpp/HelloCpp-Prefix.pch @@ -0,0 +1,14 @@ +// +// Prefix header for all source files of the 'HelloCpp' target in the 'HelloCpp' project +// + +#import + +#ifndef __IPHONE_4_0 +#warning "This project uses features only available in iOS SDK 4.0 and later." +#endif + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/HelloCpp/ViewController.h b/HelloCpp/ViewController.h new file mode 100644 index 0000000..acbde4a --- /dev/null +++ b/HelloCpp/ViewController.h @@ -0,0 +1,14 @@ +// +// ViewController.h +// HelloCpp +// +// Created by Ademar Alves de Oliveira on 5/28/13. +// Copyright (c) 2013 Jurema. All rights reserved. +// + +#import +#import "CoreWrapper.h" + +@interface ViewController : UIViewController + +@end diff --git a/HelloCpp/ViewController.mm b/HelloCpp/ViewController.mm new file mode 100644 index 0000000..5e6147f --- /dev/null +++ b/HelloCpp/ViewController.mm @@ -0,0 +1,27 @@ +// +// ViewController.m +// HelloCpp +// +// Created by Ademar Alves de Oliveira on 5/28/13. +// Copyright (c) 2013 Jurema. All rights reserved. +// + +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + UITextView* txtHelloCpp = [[UITextView alloc] initWithFrame:CGRectMake(0, 140, 320, 20)]; + [txtHelloCpp setText:[CoreWrapper concateneMyStringWithCppString:@"Objective-c"]]; + [self.view addSubview:txtHelloCpp]; + [txtHelloCpp release]; +} + +@end diff --git a/HelloCpp/Wrapper/CoreWrapper.h b/HelloCpp/Wrapper/CoreWrapper.h new file mode 100644 index 0000000..98b810c --- /dev/null +++ b/HelloCpp/Wrapper/CoreWrapper.h @@ -0,0 +1,16 @@ +// +// CoreWrapper.h +// HelloCpp +// +// Created by Ademar Alves de Oliveira on 5/28/13. +// Copyright (c) 2013 Jurema. All rights reserved. +// + +#import +#import "Core.h" + +@interface CoreWrapper : NSObject + ++ (NSString*) concateneMyStringWithCppString:(NSString*)myString; + +@end diff --git a/HelloCpp/Wrapper/CoreWrapper.mm b/HelloCpp/Wrapper/CoreWrapper.mm new file mode 100644 index 0000000..de7c9d1 --- /dev/null +++ b/HelloCpp/Wrapper/CoreWrapper.mm @@ -0,0 +1,18 @@ +// +// CoreWrapper.m +// HelloCpp +// +// Created by Ademar Alves de Oliveira on 5/28/13. +// Copyright (c) 2013 Jurema. All rights reserved. +// + +#import "CoreWrapper.h" + +@implementation CoreWrapper + ++ (NSString*) concateneMyStringWithCppString:(NSString*)myString +{ + return [NSString stringWithUTF8String:concateneMyStringWithCppString([myString UTF8String])]; +} + +@end diff --git a/HelloCpp/en.lproj/InfoPlist.strings b/HelloCpp/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/HelloCpp/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/HelloCpp/main.m b/HelloCpp/main.m new file mode 100644 index 0000000..9c235bb --- /dev/null +++ b/HelloCpp/main.m @@ -0,0 +1,18 @@ +// +// main.m +// HelloCpp +// +// Created by Ademar Alves de Oliveira on 5/28/13. +// Copyright (c) 2013 Jurema. All rights reserved. +// + +#import + +#import "AppDelegate.h" + +int main(int argc, char *argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/README.md b/README.md index 4ccea41..4746b95 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -CppAndroidIosExample +C++ Android Ios Example ==================== -A application example using the same CPP code on an Android project and on an iPhone project. +A application example using the same C++ code on an Android project and on an iPhone project.