adding iconv library into qt for android project
-
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!
-
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!
@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?
-
@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?
@jsulm For ARM. For now I'm just including the directory libiconv-1.17(include_directories) in CMakeLists.txt file.
-
@jsulm For ARM. For now I'm just including the directory libiconv-1.17(include_directories) in CMakeLists.txt file.
@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)
-
@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)
@jsulm you mind telling me what the statement would look like if i've included libiconv-1.17 in the current project directory? Thanks!
-
@jsulm you mind telling me what the statement would look like if i've included libiconv-1.17 in the current project directory? Thanks!
@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."