Editing .mk files for Android in Qt
Excuse my ignorance. I now have 1 day worth of experience developing Android so I apologize if this question is completely ignorant.
I am working on getting my game engine to be cross platform. I was able to compile and test my engine on desktop, ios and android. With Android though I had to doctor the code a bit because Qt was complaining about a missing some openGL library stuff. After doing some poking around someone mentioned this:
bq. In .mk file, I wrote:
@LOCAL_LDLIBS := -lGLESv1_CM -ldl -llog -lz -landroid -lEGL@
What is a .mk file? and how/where do I edit this in Qt?
From what I know you cannot edit .mk with a Qt project because for Qt it's a build file that every time you clean and rebuild the project is destroyed and recreated.
So, for add additional flags to the compilation you should add them to the .pro via a QMake variable LIBS
LIBS += -lGLESv1_CM -ldl -llog -lz -landroid -lEGL
However, there is something strange on what you said, because for me it's very weird that you have to explicit link to OpenGL libraries and to 'android' lib.
It seems that there is something going wrong. But it's just a my impression.
Please, try to write some details about your project and why your arrived to the conclusion you need to add the above libraries, maybe someone you'll find a better way to solve the issue.
The problem had something to do with trying to ask OpenGL for its extensions. The compiler complained it couldn't find the following function
After some google searches, someone posted the -lGLESv1_CM -ldl -llog -lz -landroid -lEGL solution.
I actually found a work around. Qt has a VAO wrapper that will fail if the device can't use VAO's. So I just relied on that instead of calling the openGL function.
So for now, yet roadblock has been bypassed. I should try what you mentioned to see if my original code worked.