Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Problem compiling for Android. SDL2/SDL.h Not found  (Read 4249 times)

0 Members and 1 Guest are viewing this topic.

fernandonn

  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 6
    • View Profile
Problem compiling for Android. SDL2/SDL.h Not found
« on: September 09, 2013, 11:32:44 PM »

Hi.. we are trying to compile wmelite for Android, but we are unsuccessful so far.
After trying several things, we manage to get to an error that says jni/src/../../../src/PlatformSDL.h:30:22: fatal error: SDL2/SDL.h: No such file or directory

The error happens after we copy the dependency folder in the wmelite root.
We tried adding to LOCAL_C_INCLUDES the path /usr/local/includes, where the .h from the linux system reside, but after that, we have trouble finding iconv.

Any help would be much appreciated.  ::slug
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 163
    • View Profile
Re: Problem compiling for Android. SDL2/SDL.h Not found
« Reply #1 on: September 13, 2013, 01:15:34 PM »

Hi,

you should never use Linux include files or include paths in your Android project. All dependencies shall be satisfied by the "dependencies" and "prebuilt" folders, which you copy to the wmelite project after compiling all dependent libraries.

Could you successfully compile all the dependent libraries (including SDL2)? If that didn't work, wmelite itself will most likely also not compile ;-)
Logged

fernandonn

  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 6
    • View Profile
Re: Problem compiling for Android. SDL2/SDL.h Not found
« Reply #2 on: September 17, 2013, 04:49:38 PM »

I tried not using Linux dependencies but there were many .h not found. But thanks for the adivce. I'll try again and come back with more information if I have other problems.

All the others libraries were compiled without problem in Android.

Thanks !
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 163
    • View Profile
Re: Problem compiling for Android. SDL2/SDL.h Not found
« Reply #3 on: September 19, 2013, 11:21:04 AM »

Hi,

please check that the paths from the file

Code: [Select]
wmelite / android / jni / src / Android.mk

can be resolved. For SDL, for instance, the path is defined like this:

Code: [Select]
SDL_PATH := ../../../dependencies/SDL/jni/

LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include ...

so you should have a path "wmelite/dependencies/SDL/jni/include" on your system. The same is true for the other include paths.

This way you should get rid of all "evil" ;) Linux include paths.
Logged

diegoquarantine

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 50
    • View Profile
    • Buenos Aires Quarantine Studio
Re: Problem compiling for Android. SDL2/SDL.h Not found
« Reply #4 on: November 22, 2014, 09:18:04 AM »


Hi! I'm having this very same error but I'm trying to compile the Xcode build on a mac. It highlights the line

Code: [Select]
#include "SDL.h" not found.
 

Page created in 0.112 seconds with 23 queries.