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. adding iconv library into qt for android project
Forum Updated to NodeBB v4.3 + New Features

adding iconv library into qt for android project

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 2 Posters 515 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.
  • K Offline
    K Offline
    karman_android_dev
    wrote on last edited by
    #1

    Hi, I'm trying to build a qt project on an android device from a Linux machine. One of the cpp files contains the iconv.h header. I think iconv library doesn't compile for arm so I had to build it externally from here. I tried including the libiconv directory into the CmakeLists.txt file but still getting the same error. I think I'm not including the library correctly. Any help would be appreciated. Thanks!

    jsulmJ 1 Reply Last reply
    0
    • K karman_android_dev

      Hi, I'm trying to build a qt project on an android device from a Linux machine. One of the cpp files contains the iconv.h header. I think iconv library doesn't compile for arm so I had to build it externally from here. I tried including the libiconv directory into the CmakeLists.txt file but still getting the same error. I think I'm not including the library correctly. Any help would be appreciated. Thanks!

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @karman_android_dev said in adding iconv library into qt for android project:

      I think iconv library doesn't compile for arm so I had to build it externally from here.

      For ARM or x86? Also, did you build it for Android? How do you include the lib now in your project?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      K 1 Reply Last reply
      0
      • jsulmJ jsulm

        @karman_android_dev said in adding iconv library into qt for android project:

        I think iconv library doesn't compile for arm so I had to build it externally from here.

        For ARM or x86? Also, did you build it for Android? How do you include the lib now in your project?

        K Offline
        K Offline
        karman_android_dev
        wrote on last edited by
        #3

        @jsulm For ARM. For now I'm just including the directory libiconv-1.17(include_directories) in CMakeLists.txt file.

        jsulmJ 1 Reply Last reply
        0
        • K karman_android_dev

          @jsulm For ARM. For now I'm just including the directory libiconv-1.17(include_directories) in CMakeLists.txt file.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @karman_android_dev said in adding iconv library into qt for android project:

          include_directories

          This is not enough, it just tells where to find the header files. You also need to tell CMake that you want to link this library (https://cmake.org/cmake/help/latest/command/target_link_libraries.html)

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          K 1 Reply Last reply
          0
          • jsulmJ jsulm

            @karman_android_dev said in adding iconv library into qt for android project:

            include_directories

            This is not enough, it just tells where to find the header files. You also need to tell CMake that you want to link this library (https://cmake.org/cmake/help/latest/command/target_link_libraries.html)

            K Offline
            K Offline
            karman_android_dev
            wrote on last edited by
            #5

            @jsulm you mind telling me what the statement would look like if i've included libiconv-1.17 in the current project directory? Thanks!

            K 1 Reply Last reply
            0
            • K karman_android_dev

              @jsulm you mind telling me what the statement would look like if i've included libiconv-1.17 in the current project directory? Thanks!

              K Offline
              K Offline
              karman_android_dev
              wrote on last edited by karman_android_dev
              #6

              @jsulm okay so i have a libiconv.a library file in my usr/lib directory. I tried linking it through target_link_libraries but I get an error "/home/translateLocally_arm_branch/translateLocally_Android/CMakeLists.txt:131: error: Cannot specify link libraries for target "translateLocally" which is not built by this project."

              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