Sat, 03/23/2024 - 15:57
Good afternoon,
Currently,Encountered the following warning during compilation. How can I resolve it.
Some additional information:
-OpenCascade version 7.8.0
-CMake version3.22.1
-Cross-compilation toolchain for CMake:https://github.com/taka-no-me/android-cmake
-Android NDK version R12b
-MinGW version 8.1.0
-ANDROID_ABI = armeabi-v7a
-ANDROID_NATIVE_API_LEVEL = 15
The warning content is as follows:
*************************************************************************************************************
CMake Deprecation Warning at D:/program files/CMake/share/cmake-3.22/Modules/CMakeForceCompiler.cmake:75 (message):
The CMAKE_FORCE_C_COMPILER macro is deprecated. Instead just set
CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
E:/OCCT/android-occt/android-cmake-master/android.toolchain.cmake:1129 (CMAKE_FORCE_C_COMPILER)
E:/OCCT/android-occt/androidbuild/CMakeFiles/3.22.1/CMakeSystem.cmake:6 (include)
CMakeLists.txt:67 (project)
CMake Deprecation Warning at D:/program files/CMake/share/cmake-3.22/Modules/CMakeForceCompiler.cmake:89 (message):
The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set
CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
E:/OCCT/android-occt/android-cmake-master/android.toolchain.cmake:1141 (CMAKE_FORCE_CXX_COMPILER)
E:/OCCT/android-occt/androidbuild/CMakeFiles/3.22.1/CMakeSystem.cmake:6 (include)
CMakeLists.txt:67 (project)
**************************************************************************************************************
Then,Open console and go to the build folder,Encountered the following error:
**************************************************************************************************************
[ 0%] Building CXX object src/TKernel/CMakeFiles/TKernel.dir/__/FSD/FSD_Base64.cxx.o
g++.exe: error: unrecognized command line option '-mfloat-abi=softfp'
g++.exe: error: unrecognized command line option '-mfpu=vfpv3-d16'
g++.exe: error: unrecognized command line option '-mthumb'; did you mean '-mtbm'?
mingw32-make[2]: *** [src\TKernel\CMakeFiles\TKernel.dir\build.make:75: src/TKernel/CMakeFiles/TKernel.dir/__/FSD/FSD_Base64.cxx.o] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:1015: src/TKernel/CMakeFiles/TKernel.dir/all] Error 2
mingw32-make: *** [Makefile:123: all] Error 2
thank you!
Sat, 03/23/2024 - 16:00
OCCT Cross-compiling (Android)
Sat, 03/23/2024 - 16:04
Hello,
Needs to analyse from our side. Thank you for reporting. But looks like there are can be fast solution with updating compiler flags for mingw. Could you create a ticket in our mug tracker?
Best regards, Dmitrii.
Sat, 03/23/2024 - 16:37
Thank you very much
Sun, 04/21/2024 - 02:38
hi,today I have updated compiler flags for mingw,mingw is x86_64-13.2.0-release-win32-seh-ucrt-rt_v11-rev0。
But the same problem still occurred:
************************************************************************************
E:\OCCT\android-occt\androidbuild>mingw32-make
[ 0%] Building CXX object src/TKernel/CMakeFiles/TKernel.dir/__/FSD/FSD_Base64.cxx.o
g++.exe: error: unrecognized command-line option '-mfloat-abi=soft'
g++.exe: error: unrecognized command-line option '-mfpu=vfpv3-d16'
g++.exe: error: unrecognized command-line option '-mthumb'
mingw32-make[2]: *** [src\TKernel\CMakeFiles\TKernel.dir\build.make:75: src/TKernel/CMakeFiles/TKernel.dir/__/FSD/FSD_Base64.cxx.o] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:1015: src/TKernel/CMakeFiles/TKernel.dir/all] Error 2
mingw32-make: *** [Makefile:123: all] Error 2
***********************************************************************************************************************
thank you!