Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Error Compiling SFML for android with Visual Studio  (Read 2200 times)

0 Members and 2 Guests are viewing this topic.

Optimistic

  • Newbie
  • *
  • Posts: 14
    • View Profile
Error Compiling SFML for android with Visual Studio
« on: February 10, 2018, 03:44:30 pm »
Hi there, I was trying to compile SFML following this link: https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android

I installed all of the dependencies and then I rebooted my computer. I followed every step until I got to the cmake command.  In this case I get this error:
Code: [Select]
CMAKE_SYSTEM_NAME is 'Android' but 'NVIDIA Nsight Tegra Visual Studio Edition'I looked it up and found out I had to install 'NVIDIA Nsight Tegra Visual Studio Edition' at https://developer.nvidia.com/nvidia-nsight-tegra

But the problem is that this requires Visual studio Professional and I only have Express  :-\. What can I do? :'(

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Error Compiling SFML for android with Visual Studio
« Reply #1 on: February 13, 2018, 11:16:24 am »
Get Visual Studio 2017 Community Edition; it's free to use unless you make more than enough money to actually buy the Professional Edition. :)

Besides that, never got it to build flawlessly with Nsight Tegra, unfortunately, but you'll basically just need some build tool to run the NDK stuff (e.g. MinGW32's make, Ninja, etc.). It doesn't really matter, but CMake insists on using Nsight Tegra, if you're using Visual Studio as the target generator.

Optimistic

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Error Compiling SFML for android with Visual Studio
« Reply #2 on: February 13, 2018, 11:57:24 pm »
Well you see.... I do have the community edition...   Guess I'll have to reinstall Visual Studio  >:(...

For the time being I got it to compile using the following steps:

Follow the Tutorial right up before the cmake step.

Follow the steps here just to compile cmake

Set the cmake path variable to the bin folder of the above step. If you want to use the examples then add the
Code: [Select]
SFML_COMPILE_EXAMPLES flag.

Run the cmake step in the SFML-for-Android tutorial

Use
Code: [Select]
nmake && nmake install
Go to [ndk-path-here]\source\sfml and add this line:
Code: [Select]
TARGET_ARCH_ABI := armeabi between
Code: [Select]
LOCAL_PATH := $(call my-dir) and
Code: [Select]
include $(CLEAR_VARS)
Now go to the android example folder and the example compilation steps on the tutorial page should work.

Result should be in android/bin/NativeActivity-debug.apk.

[PS. I did all of this in a separate partition, so I had to set a few environment variables myself.]