I tried this , off course got new errors about some fastmix.o file containing invalid arguments. Deleted it as I thought , test without. Offcourse got new errors about the missing file and give up.
the compiler (ndk-build) complaints of errors and warnings from line 300
error : expected ’ ; ’ at end of declaration
std::vectorstd::string otherImagePaths { “…”};
i get 20 errors like that complaining of each vector declaration.
as well as many C++11 standard warnings.
Difficult to say what’s wrong by the information you provide. Your SDL source is corrupted, a wrong version of C/C++ is chosen somewhere in the makefiles, etc. No one will just take the code of your project, and make it to work for you. It looks like clear that your Android development environment works well. All is about the project, but you jump too fast to building your project, instead of testing something first that is known to work. You create too much unknown all at once, this is difficult to solve, and no one may be able to help you then. This is the importance of the “Hello World” type things, they don’t do much, but a lot has to work for that simple thing to happen, so a lot is achieved when that simple test runs successfully.
but it works perfectly fine when I run it on my laptop (in devc++) ? it just makes no sense.
so do you think the problem is with my code then , and only my code ?
Not necessarily your code, but the makefiles, etc, for Android which should correspond to your code. Also bad or wrongly configured SDL source code. That it builds for your laptop but does not for Android, this completely makes sense. So try it first with something that is known to compile for Android, not with your project, then see what differs and what you may have to change.
This sounds like the Android compiler is not expecting C++11.
Are you using ndk-build? If so, maybe post your .mk files.
This might help, although it is 3 years old:
Thanks Eric. I did that , and still it didn’t make a difference.
I also have this warning:
android ndk: warning unsupported source file extensions in jni/src/android.mk for module main
so because my code builds in devc++ it’s probably a android compiler problem, speciffically that it doesn’t expect c++11 (as I got a lot of warnings about it) ?
maybe I can post the code /images online somehere and somebody willing compiles it on their system ?
Thanks
i get warnings / errors for the jni/smpeg2 hufftable.cpp file ??! It just never ends
I don’t want to be a pain, but I’m still very much stuck with this. More then a month now
I just want to get my app on my phone , see it , test it etc .
Please, local, or remotely, any help. I’ll pay. I am getting a bit desperate
I can post a link to all the mk files at least later tonight. hopefully that might help .
Just following this conversation, I don’t have an answer, but I think there is a lot of missing information for anyone to properly diagnose the exact issue you are running into.
Here are some things that are going to make things easier:
What platform are you building from? Windows? Linux? Mac? Something else?
What toolchain are you using? Gcc? MSVC? Something else?
What version are all your build tools (ndk, android sdk, c++, etc.)
Can you provide either a zip or a source code repository (like github) so we can see all files (even ones you don’t think are relevant)? If this is a closed source project, are you able to reproduce your issue in a test application that you could post as a zip or source code repository? Providing a full project (even if it’s just a minimal reproduction of your app) for other people test will increase everyone’s chances of figuring out what the issue is. This will also means we can verify that the suggestions made in this thread have been applied properly, and makes it easier for anyone on the thread to suggest other fixes.
Can you take a screenshot of your android sdk configuration so we can see exactly what modules and versions you have installed?
I’m not sure if your project issues are spread between different discussion threads, so maybe you’ve already provided some of this information elsewhere, but it would be nice if everything were in one place to let the community know exactly what your setup is.
Windows 7 professional.
mingw compiler, but I don’t know the version as I can’t even find the original download folder?
ndk version 13.
sdk version ?, I can only find something about apache version 2 in a text file within the sdk folder.
but I think I downloaded it from here: https://developer.android.com/studio /index.html#downloads
just the command line tools for windows.
Up to c++11 standard
SDL2_ttf 2.0.14
SDL2_mixer 2.0.1
SDL2_image 2.0.1
SDL2_2.05
apache ant 1.10.1 bin
I don’t know if it’s relevant but: devc++ 5.11 TDM-GCC
jdk 8u121
Problem is I changed so many setups over the years of differnt IDEs etc and compilers I don’t really know what is what anymore.
I probably should keep better track of these things in the future
I used lazy foo sdl2 tutorial 52 to set sdl2 on windows android.
getting this finally solved would mean so much to me !!
I think you should zip all your project and provide it here, if you want anyone to try to make it to work. Don’t archive the SDL and other libraries source code. You can upload it in GitHub or in some file upload site. Anyone that is, not me, i just don’t see how it’s otherwise possible.
everyone will get a case of beer or whatever they like to drink from me
No no, beer is not enough. One needs to donate to the open source development, for the benefit of humanity A minimum donation used to be $20 I’m joking, i have received no donations yet, in spite of doing open source development for more than 10 years.
Thanks for the reply. I’m only not sure what you’re asking?
just my code project in single zip file ?
do you by any chance happen to know any file sharing sites that accept a folder in a single copy/paste ?
otherwise it will be a lot of work to upload every single file one by one
Your main options are using Google Drive, or Github. Zip up all your entire project folder. If you’re using any third-party libraries, make sure their source files are also in your folder too.
Thanks for the reply . So if I remove any C++11 features my code is fine for the rest?
Yes. What concerns compiling. What concerns what it does, i don’t know, i compiled it and it did run, but didn’t seem to do anything.
And ,so how do I add a link to the SDL_mixer and modify the android.mk file ?
I wrote it in Readme. You have to download the SDL_mixer source code too, as you did with SDL, SDL_image, etc. And in its Android.mk file, there are several settings that look like
SUPPORT_MOD_MODPLUG ?= true
You should change it to
SUPPORT_MOD_MODPLUG := false
If you don’t use certain libraries, because you likely have no modplug library, etc.
Ok , it should do something , it has the buttons for start etc, but they’re setup for a mobile screen?
the app when it first runs should load the flash screen , when the flashscreen is displayed it loads all textures and the startscreen. The startscreen has a few buttons , start is one of them. Then the mainscreen has a goal with several balls & a lettergame selection button (bottom right). when that is clicked it starts the alphabet ‘game’. etc.
but what I don’t understand is some were suggesting ways to get C++11 support for android turned on (in this thread).
And I have the ndk and sdk installed ? I think I adjusted the paths (with lazy foo tutorial 53).
so I just have to add these paths to the enverionment variables I see the ndk path in my paths and a path to apache platform tools ?
I have downloaded and linked all the sdl extensions, and I think they do compile when I run ndk-build ?
so how would I change this . All these extension libraries are in the jni folder, for some reason not in the dropbox folder , because that was very fussy to use , but they are on my laptop.
Thanks
I do want to give you at least a gift card when I solve this I. And everyone who replied