after following the lazyfoo tutorial i was able to port is hellomobile.cpp with 3 libs(SDL,images,ttf and mixer), once i was sure,i added my src to it, but it seems there is issues i just dont know to what to do now:(
i am getting this undefined reference, while the same project in visual studio for windows is running fine.
Oh, it’s not… I did it on my tablet, there was no magnifying glass. Sending pictures with errors to developers is like sending text if you could send a picture of your new car to your friends =) I can’t read it. The messages are cut off. Looks like it can’t find the engine
Your target is MIPS?
Most of the tutorials for building on Android are heavily outdated and a lot fiddling is asked.
no i did not target mips, but i was getting the android depricated so i read in stackoverflow to add mips, but that didnt change anything, i will give u more info on the error , right now i am at work
I’ve spent 3 weeks wrestling with Android Studio to get SDL & SDL_mixer to work. It wasn’t fun, but I did it and it works with the latest Gradle and Build Tools. I even got full screen AdMob ads and OpenURL working by making custom JNI functions. So, if you need help, I’m your man. I didn’t copy SDL or use simlinks - I did it so all projects share the same SDL source directory. I’m thinking of putting a tutorial together? All the other tutorials I tried didn’t work.
Posting a picture doesn’t give much away. Really need to see all your .mk and Gradle files.
Awesome! I will definitely come back to you! I am still working on timing and state integration. Since I am not satisfied with my timing, started to getting ambitious on that. I spent way too much time on Animations, damn they are so time consuming. In my next life I use Unity, hahaha. One can’t really write good software if timing isn’t proper and physics will be a mess. Ofc I would encourage you to set up at least a gist, if you are like me you forget the half in two weeks =)
@mrgameoz
Yes, I was not messing. I can’t emphasize that often enough. Tiny well set up steps in development - it pays out (stress level wise) and using one of those https://technologyadvice.com/blog/information-technology/github-alternatives/ to show off what you have done is gold.
Yesterday I lost like 3h cause I was messing with CPU-time instead of walltime, couldn’t get (2)nanosleep to work, why I tell this in this context? - cause one really need to focus on thing at a time =) Do tiny steps to progress to end up with less mess. Uh, and either write it down if you succeded or have your code/recipes well placed, like snippets in your Editor/IDE. Losing so much time every day in searching/failing/redoing.
Software Development is complex nowadays - can’t have functionality without complexity.
Back in time, for my prototype, I used @JonnyD Tutorial - Thanks!!!
include $(CLEAR_VARS)
LOCAL_MODULE := main
SDL_PATH := ../SDL2
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include $(LOCAL_PATH)/../SDL2_image/ $(LOCAL_PATH)/../SDL2_ttf/ $(LOCAL_PATH)/../SDL2_mixer/
# Add your application source files here...
LOCAL_SRC_FILES := main.cpp
LOCAL_SHARED_LIBRARIES := SDL2 SDL2_image SDL2_ttf SDL2_mixer
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog
LOCAL_CFLAGS := -std=gnu++11
include $(BUILD_SHARED_LIBRARY)
Application.mk
# Uncomment this if you're using STL in your project
# See CPLUSPLUS-SUPPORT.html in the NDK documentation for more information
APP_STL := stlport_static
#armeabi-v7a arm64-v8a x86 x86_64
APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
# Min runtime API level
APP_PLATFORM=android-14
just now i noticed a notificaition that says “This file is not part of the project. Please include it in the appropriate file (build.gradle, CMakelists.txt or Android.mk etc) and sync the project.”
i know added .cpp files and header files to android.mk… god damnit, it seems i need to add each and every file to it,but i was able see that my source files are compiling,which is good i am now receiving some errors regarding to_string() and SDL_Log() is unidentified, i commented these two things and i was able to compile the project successfully, and i was able to install it on mobile… but running it throwed an error
ASSERTION FAILED:
Assertion failure at SDL_Getwindowsize_REAL
it seems i am using getwindowsize somewhere i need to verify how i am using it. get back to guys soon