I have installed Ogre3D for Android following this guide
Now I want to build a simple file containing only ¨int main(int argc, char **argv) { return 0;}¨, but I get errors when compiling.
Code: Select all
cfoch@cfoch-ubuntu:~/Documents/git/cfoch-ogre/hello$ /home/cfoch/opt/android-ndk-r10e/prebuilt/linux-x86_64/bin/make
/home/cfoch/opt/android-ndk-r10e/prebuilt/linux-x86_64/bin/make all-am
make[1]: Entering directory `/home/cfoch/Documents/git/cfoch-ogre/hello'
/bin/bash ./libtool --tag=CXX --mode=link g++ -I/home/cfoch/opt/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/user/include -I/home/cfoch/opt/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/user/include/OGRE -I/usr/include/freetype2 -I/usr/include/libdrm -I/home/cfoch/opt/include/OIS -I/home/cfoch/opt/include -g -O2 -o OgreApp OgreApp-hello.o -L/home/cfoch/opt/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/user/lib -L/home/cfoch/opt/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/user/lib/OGRE -lOgreMainStatic -lfreeimage -lfreetype -Wl,-Bsymbolic-functions -Wl,-z,relro -lzzip -lz -lXaw7 -lXt -lX11 -lGL -L/home/cfoch/opt/lib -lOIS
libtool: link: g++ -I/home/cfoch/opt/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/user/include -I/home/cfoch/opt/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/user/include/OGRE -I/usr/include/freetype2 -I/usr/include/libdrm -I/home/cfoch/opt/include/OIS -I/home/cfoch/opt/include -g -O2 -o OgreApp OgreApp-hello.o -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -L/home/cfoch/opt/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/user/lib -L/home/cfoch/opt/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/user/lib/OGRE -lOgreMainStatic -lfreeimage -lfreetype /usr/lib/x86_64-linux-gnu/libzzip.so -lz -lXaw7 -lXt -lX11 -lGL -L/home/cfoch/opt/lib -lOIS
/usr/bin/ld: skipping incompatible /home/cfoch/opt/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/user/lib/libOgreMainStatic.a when searching for -lOgreMainStatic
/usr/bin/ld: cannot find -lOgreMainStatic
/usr/bin/ld: cannot find -lfreeimage
/usr/bin/ld: skipping incompatible /home/cfoch/opt/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/user/lib/libfreetype.a when searching for -lfreetype
/usr/bin/ld: skipping incompatible /home/cfoch/opt/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/user/lib/libOIS.a when searching for -lOIS
collect2: error: ld returned 1 exit status
make[1]: *** [OgreApp] Error 1
make[1]: Leaving directory `/home/cfoch/Documents/git/cfoch-ogre/hello'
make: *** [all] Error 2
cfoch@cfoch-ubuntu:~/Documents/git/cfoch-ogre/hello$
Code: Select all
#PATH
export PATH=$PATH:/home/cfoch/opt/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/cfoch/opt/lib/
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/cfoch/opt/lib/pkgconfig/
# PATH: git-phab
export PATH=/home/cfoch/.local/bin/:$PATH
# virtualenwrapper
# VIRTUALENVWRAPPER_PYTHON='/usr/bin/python3' # This needs to be placed before the virtualenvwrapper command
# source /usr/local/bin/virtualenvwrapper.sh
# OGRE
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/cfoch/Documents/mercurial/ogre/build/pkgconfig/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/cfoch/Documents/mercurial/ogre/build/lib/
export PATH=$PATH:/home/cfoch/Documents/mercurial/ogre/include/
# ANDROID
export PATH=$PATH:/home/cfoch/opt/android-sdk-linux/tools/
export PATH=$PATH:/home/cfoch/opt/android-sdk-linux/platform-tools/
export PATH=$PATH:/home/cfoch/opt/android-ndk-r10e/
export ANDROID_NDK=/home/cfoch/opt/android-ndk-r10e/
bootstrap
Code: Select all
rm -rf autom4te.cache
libtoolize --force --copy && aclocal && autoheader && automake --add-missing --force-missing --copy --foreign && autoconf
Code: Select all
AC_INIT(configure.ac)
AM_INIT_AUTOMAKE(SampleApp, 0.1)
AM_CONFIG_HEADER(config.h)
AC_LANG_CPLUSPLUS
AC_PROG_CXX
AM_PROG_LIBTOOL
PKG_CHECK_MODULES(OGRE, [OGRE >= 1.2])
AC_SUBST(OGRE_CFLAGS)
AC_SUBST(OGRE_LIBS)
PKG_CHECK_MODULES(OIS, [OIS >= 1.0])
AC_SUBST(OIS_CFLAGS)
AC_SUBST(OIS_LIBS)
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
Code: Select all
# noinst_HEADERS= BaseApplication.h TutorialApplication.h
bin_PROGRAMS= OgreApp
# OgreApp_CPPFLAGS= -I$(top_srcdir)
OgreApp_SOURCES= hello.cpp
OgreApp_CXXFLAGS= $(OGRE_CFLAGS) $(OIS_CFLAGS)
OgreApp_LDADD= $(OGRE_LIBS) $(OIS_LIBS)
EXTRA_DIST = bootstrap
AUTOMAKE_OPTIONS = foreign
Code: Select all
int
main (int argc, char ** argv)
{
return 0;
}
THE ERROR...