Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Editing .mk files for Android in Qt
Forum Updated to NodeBB v4.3 + New Features

Editing .mk files for Android in Qt

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kloveridge
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • GianlucaG Offline
      GianlucaG Offline
      Gianluca
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kloveridge
        wrote on last edited by
        #3

        The problem had something to do with trying to ask OpenGL for its extensions. The compiler complained it couldn't find the following function

        @eglGetProcAddress()@

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved