Hi Thank you for the quick response. >> What generator are you now using?
Right! I forgot to mention this. I am using the "NMake Makefiles JOM" >> We don't have first-class support for those steps outside of Nsight Tegra. >> They need to be done with add_custom_target/add_custom_command. This is what I thought! Regalir -----Original Message----- From: Brad King [mailto:brad.k...@kitware.com] Sent: Tuesday, November 15, 2016 8:12 AM To: Roberto Regalino <roberto.regal...@autodesk.com> Cc: cmake-developers@cmake.org Subject: Re: [cmake-developers] CMAKE 3.7 (for Android target) error: crtbegin_dynamic.o:crtbrand.c:function _start: error: undefined reference to 'main’ On 11/14/2016 04:38 PM, Roberto Regalino wrote: > still target Android but not using VisualStudio What generator are you now using? > So far, I managed to create a new toolchain file containing the following: > > set(CMAKE_ANDROID_API 21) > set(CMAKE_ANDROID_SKIP_ANT_STEP 0) > set(CMAKE_ANDROID_JAVA_SOURCE_DIR java) set(CMAKE_ANDROID_BUILD_SYSTEM > GradleBuild) These are all settings for the Nsight Tegra Visual Studio Edition generation. See documentation here: * https://cmake.org/cmake/help/v3.7/manual/cmake-toolchains.7.html#cross-compiling-for-android for how to configure the Ninja or Makefile generators with a toolchain file. > crtbegin_dynamic.o:crtbrand.c:function _start: error: undefined reference to > 'main’ For a purely-native binary created via add_executable then one of the sources should have "main". For creating an apk then additional steps are needed IIUC, but I'm not very familiar with them. > My understanding is that these Gradle steps are responsible for > embedding the AndroidManifest (that, I’ve been told, will define the > ‘main’) and generate the apk file from the so. > > can anyone confirm if CMake 3.7 does provide the equivalent steps or > if I need to define them myself? We don't have first-class support for those steps outside of Nsight Tegra. They need to be done with add_custom_target/add_custom_command. Can anyone more familiar with APK generation add more? -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers