Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [solved]Can qrencode be build with Qt for android/ios apps ? If so how?
QtWS25 Last Chance

[solved]Can qrencode be build with Qt for android/ios apps ? If so how?

Scheduled Pinned Locked Moved General and Desktop
qrenode
10 Posts 3 Posters 3.5k Views
  • 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.
  • musimbateM Offline
    musimbateM Offline
    musimbate
    wrote on last edited by musimbate
    #1

    Hi,
    I want to generate qr codes in my qt app that is supposed to run both on android and ios.I have found qrencode which is written in pure c but I can't figure out how to build it to work with my qt app on a windows machine. My kit is Android for armeabi-v7a(GCC 4.9 ,Qt 5.4.1) and I am developping this on** a x86 64 bit windows 7 machine**. Is there a way I can generate .a files that I can link against with mingw?.If so how?

    Thanks for your time.

    Why join the navy if you can be a pirate?-Steve Jobs

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      It doesn't look like the build system of qrencode generates any particular code file , so what you can do is include the source code directly in your project so you'll built it directly for each platform.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • musimbateM Offline
        musimbateM Offline
        musimbate
        wrote on last edited by
        #3

        Thanks for the reply ,I have done that and have been getting undefined references and thought I had been doing something wrong.Now I am going to look into it again with more confidence :-) .

        Why join the navy if you can be a pirate?-Steve Jobs

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What error did you got ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • musimbateM Offline
            musimbateM Offline
            musimbate
            wrote on last edited by musimbate
            #5

            It was undefined references on some functions.Adding the files to the project( through the .pro file) and applying minor changes I was able to build it (tested on msvc and mingw).The STATIC keyword as shown here

            '''
            __STATIC void MQRraw_free(MQRRawCode *raw);
            '''

            was causing syntax errors( I don't know what it is meant for ) simply removing it and removing ''inline'' from this statement:
            '''
            static inline int modnn(RS *rs, int x){
            '''

            in the rscode.c the code build successfuly. Should also mention that I was able to generate QR code by referring to this so

            Why join the navy if you can be a pirate?-Steve Jobs

            1 Reply Last reply
            0
            • musimbateM Offline
              musimbateM Offline
              musimbate
              wrote on last edited by
              #6

              I have bundled the qrencode library into a Qt project for ease of use. The code is available for anyone interested.

              Why join the navy if you can be a pirate?-Steve Jobs

              1 Reply Last reply
              1
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Thanks for sharing but if I may, your repository should not contain object files nor build output. You should also have a direct link to the QRencoder library for it to be easier to find.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                1
                • musimbateM Offline
                  musimbateM Offline
                  musimbate
                  wrote on last edited by
                  #8

                  @SGaist
                  Thanks for the input.Taken care of .It is way cleaner now :-)

                  Why join the navy if you can be a pirate?-Steve Jobs

                  F 1 Reply Last reply
                  1
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    You're welcome !

                    You can also remove the .pro.user file, it's only relevant for your computer setup

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • musimbateM musimbate

                      @SGaist
                      Thanks for the input.Taken care of .It is way cleaner now :-)

                      F Offline
                      F Offline
                      FrankiPL
                      wrote on last edited by
                      #10

                      @musimbate Thanks for sharing code on github ;) it saved me a lot of work.

                      1 Reply Last reply
                      1

                      • Login

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