|
compiling for android |
William Labbett
Member #4,486
March 2004
|
Quote:
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE): This is what I got when configuring CMake. Obviously I've installed the ndk to C:/android-ndk-r7-windows . I definitely downloaded the windows ndk but it's got the word linux everywhere. What I'd like to know is if the compiler can't compile because it's the wrong one or whether there's something else I need to do.. Appreciate any help.
|
Peter Wang
Member #23
April 2000
|
Have a look in CMakeFiles/CMakeError.log and CMakeFiles/CMakeOutput.log Note that as of right now the Android port does not compile. You will need to revert back to r15152 or earlier.
|
Trent Gamblin
Member #261
April 2000
|
Is that because of the opengl changes I recently made? Do I have to boot up the desktop and fix it?
|
William Labbett
Member #4,486
March 2004
|
Normally we type : svn co https://alleg.svn.sourceforge.net/svnroot/alleg/allegro/branches/5.1 How do we specify the revision to download ?
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
svn help checkout said:
c:\ctwoplus\progcode\allegro5>svn help checkout If specified, REV determines in which revision the URL is first If PATH is omitted, the basename of the URL will be used as If --force is used, unversioned obstructing paths in the working See also 'svn help update' for a list of possible characters Valid options: Global options: c:\ctwoplus\progcode\allegro5> So it looks like svn co URL[@15152] will work. Haven't tried it though. Maybe svn co -r 15152 URL too. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Peter Wang
Member #23
April 2000
|
Trent Gamblin said: Is that because of the opengl changes I recently made? Yeah. 1/home/tjaden/ahack/ws_4.9/src/opengl/ogl_bitmap.c: In function 'ogl_lock_region':
2/home/tjaden/ahack/ws_4.9/src/opengl/ogl_bitmap.c:669: warning: implicit declaration of function 'glGetTexImage'
3/home/tjaden/ahack/ws_4.9/src/opengl/ogl_bitmap.c:681: error: 'GL_FRAMEBUFFER_BINDING_EXT' undeclared (first use in this function)
4/home/tjaden/ahack/ws_4.9/src/opengl/ogl_bitmap.c:681: error: (Each undeclared identifier is reported only once
5/home/tjaden/ahack/ws_4.9/src/opengl/ogl_bitmap.c:681: error: for each function it appears in.)
6/home/tjaden/ahack/ws_4.9/src/opengl/ogl_bitmap.c:684: warning: implicit declaration of function 'glBindFramebufferEXT'
7/home/tjaden/ahack/ws_4.9/src/opengl/ogl_bitmap.c:684: error: 'GL_FRAMEBUFFER_EXT' undeclared (first use in this function)
8/home/tjaden/ahack/ws_4.9/src/opengl/ogl_bitmap.c: In function 'ogl_unlock_region':
9/home/tjaden/ahack/ws_4.9/src/opengl/ogl_bitmap.c:823: warning: implicit declaration of function 'glWindowPos2i'
10/home/tjaden/ahack/ws_4.9/src/opengl/ogl_bitmap.c:837: warning: implicit declaration of function 'glRasterPos2f'
11/home/tjaden/ahack/ws_4.9/src/opengl/ogl_bitmap.c:842: warning: implicit declaration of function 'glDrawPixels'
12/home/tjaden/ahack/ws_4.9/src/opengl/ogl_bitmap.c:890: error: 'GL_UNPACK_ROW_LENGTH' undeclared (first use in this function)
13/home/tjaden/ahack/ws_4.9/src/opengl/ogl_bitmap.c:941: warning: unused variable 'tex_internalformat'
14/home/tjaden/ahack/ws_4.9/src/opengl/ogl_bitmap.c: In function 'al_remove_opengl_fbo':
15/home/tjaden/ahack/ws_4.9/src/opengl/ogl_bitmap.c:1167: warning: implicit declaration of function 'glDeleteFramebuffersEXT'
Maybe it's just a matter of OES vs EXT suffixes, or a missing #ifdef ALLEGRO_ANDROID somewhere.
|
Thomas Fjellstrom
Member #476
June 2000
|
Actually, It seems the largest problem is the use of GL_UNPACK_ROW_LENGTH, there is no such thing in the NDK. We need to do without that somehow, as who knows if it's actually supported by the OpenGL on android devices. append: All fixed. She compiles and runs. Now I think I'll work on the fs access stuff some more. -- |
William Labbett
Member #4,486
March 2004
|
Back again, in my ndk toolchain I've found 4 possibilities for what I could set CMAKE_C_COMPILER to : C:\android-ndk-r7-windows\android-ndk-r7\toolchains\x86-4.4.3\prebuilt\windows\i686-android-linux\bin\gcc C:\android-ndk-r7-windows\android-ndk-r7\toolchains\x86-4.4.3\prebuilt\windows\bin\i686-android-linux-gcc C:\android-ndk-r7-windows\android-ndk-r7\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\arm-linux-androideabi\bin\gcc C:\android-ndk-r7-windows\android-ndk-r7\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\arm-linux-androideabi-gcc Any idea which one I should use ?
|
Thomas Fjellstrom
Member #476
June 2000
|
None. Please follow the directions in the readme. The Allegro cmake code is setup to use a "standalone toolchain", which you create by running a script thats part of the ndk. Also I suggest using --platform=android-14 rather than -9. It does NOT mean that it only supports Android 4, just that it can support android 4. -- |
William Labbett
Member #4,486
March 2004
|
Okay. Thanks for that Those instructions are under the "Building on Linux" header so I didn't think they applied to what I was doing since I'm on Win7. After I ran the script I get this from CMake : Check for working C compiler: C:/android-toolchain/bin/arm-linux-androideabi-gcc Quote:
C:\android-toolchain\bin>dir Directory of C:\android-toolchain\bin 09/01/2012 17:53 <DIR> . C:\android-toolchain\bin> Evidently it's there in the directory, so I'm not sure why it's not finding it. ** edit ** I tried following the instructions word for word (ie using the command line) but I get the same message about the compiler not being found
|
Thomas Fjellstrom
Member #476
June 2000
|
I guess I should have tested on windows. It is there, but cmake is looking for a file without an extension. Ooops. I'm booting up my desktop for another project anyhow, I'll try and fix that asap. append: Me again. I've committed a fix that should fix that error. -- |
William Labbett
Member #4,486
March 2004
|
Cool.... ...but isn't the SVN version not working with android at the moment ? Thanks what Peter Wang said.
|
Thomas Fjellstrom
Member #476
June 2000
|
William Labbett said: Cool.... ...but isn't the SVN version not working with android at the moment ? You probably missed the edit on my second last post. I fixed it yesterday. -- |
Neil Walker
Member #210
April 2000
|
I feel your pain, I've spent all afternoon just trying to install ADT. All I get from Eclipse is random conflicting plugins, and it's even doing this for updates to plugins I already have. I just want to know why Elipse is just so shit with plug-ins. I mean, it installed the previous plugins I had and now it's telling me it can't update but it won't let me uninstall in order to start from scratch. Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
William Labbett
Member #4,486
March 2004
|
Fab.
|
Thomas Fjellstrom
Member #476
June 2000
|
I managed to get eclipse working for android dev. But found it too slow, bloated, and laggy. And a lot of other people didn't want to be tied into eclipse for working on Allegro stuff, so I made it so it'd work with the console stuff. To be honest, I'm not sure how it'd work with eclipse as it's currently set up. It would probably need an eclipse project made up for it. -- |
Neil Walker
Member #210
April 2000
|
Is there an allegro port for android I've started using this: libgdx (http://libgdx.badlogicgames.com/). It's a cross-platform java library to target android, linux, windows ( Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
Thomas Fjellstrom
Member #476
June 2000
|
Neil Walker said: Is there an allegro port for android It's not 100% working, but yes. I have a little bit of work to do on the image addon, but then at least you'll be able to display stuff more interesting than primitives. After that I'll do the audio addon. The nice thing is that your Allegro 5 apps will be mostly portable between the Desktop, iOS and Android once it's all done. There will be some changes needed due to the differences of the desktop and small form factor platforms, but it should all be fairly small changes (mostly input and screen size related). -- |
|