Android NDK: Problems including headers - android-ndk

When I try to compile my app I see...
/bin/sh: openssl/sha.h: No such file or directory
But in my Android.mk I have...
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := iconv-prebuilt
LOCAL_SRC_FILES := extlib/$(TARGET_ARCH_ABI)/libiconv.so
LOCAL_EXPORT_C_INCLUDES := extlib/include
include $(PREBUILT_SHARED_LIBRARY)
LOCAL_MODULE := git
LOCAL_C_INCLUDES := $(LOCAL_PATH)/src $(LOCAL_PATH)/include
LOCAL_CFLAGS := -DNO_GETTEXT -DSHA1_HEADER=<openssl/sha.h>
LOCAL_SRC_FILES := \
$(subst $(LOCAL_PATH)/,, \
$(wildcard $(LOCAL_PATH)/src/*.c))
LOCAL_LDLIBS := -lm -llog -ldl
LOCAL_SHARED_LIBRARIES := iconv-prebuilt
include $(BUILD_SHARED_LIBRARY)
And the ls of the extlib/include/openssl directory is...
aes.h conf.h e_os2.h krb5_asn.h opensslconf.h rc2.h ssl3.h x509_vfy.h
asn1.h conf_api.h ebcdic.h kssl.h opensslv.h rc4.h stack.h x509v3.h
asn1_mac.h crypto.h ec.h lhash.h ossl_typ.h ripemd.h symhacks.h
asn1t.h des.h ecdh.h md4.h pem.h rsa.h tls1.h
bio.h des_old.h ecdsa.h md5.h pem2.h safestack.h ts.h
blowfish.h dh.h engine.h modes.h pkcs12.h sha.h txt_db.h
bn.h dsa.h err.h obj_mac.h pkcs7.h ssl.h ui.h
buffer.h dso.h evp.h objects.h pqueue.h ssl2.h ui_compat.h
comp.h dtls1.h hmac.h ocsp.h rand.h ssl23.h x509.h
So as you can see the header file is there and should be fine to include. Any ideas what I am doing wrong here? I am guessing it is an issue in my Android.mk

Related

Full preprocessor support in Inno Setup language files (isl)

I use three languages with my installer and at the moment I'm doing all the overrides inside my script. Here's an example:
[Messages]
en.SetupWindowTitle=Setup - %1 {#AppVersion}
ru.SetupWindowTitle=Установка - %1 {#AppVersion}
ua.SetupWindowTitle=Встановлення - %1 {#AppVersion}
en.SetupAppRunningError=Setup has detected that {#SetupSetting('VersionInfoOriginalFileName')} is currently running.%n%nPlease close all instances of it now, then click OK to continue, or Cancel to exit.
ru.SetupAppRunningError=Обнаружен запущенный экземпляр {#SetupSetting('VersionInfoOriginalFileName')}.%n%nПожалуйста, закройте все экземпляры приложения, затем нажмите «OK», чтобы продолжить, или «Отмена», чтобы выйти.
ua.SetupAppRunningError=Виявлено запущений екземпляр {#SetupSetting('VersionInfoOriginalFileName')}.%n%nБудь ласка, закрийте всі копії програми та натисніть «OK» для продовження, або «Скасувати» для виходу.
[CustomMessages]
en.AppRunningError=Setup has detected that {#AppExeName} is currently running.%n%nPlease, close the {#AppExeName} application, then click «OK» to continue or «Cancel» to exit.
ru.AppRunningError=В памяти находится {#AppExeName}.%n%nЗавершите работу {#AppExeName} и нажмите «OK», чтобы продолжить, или «Отмена», чтобы выйти.
ua.AppRunningError=В пам'яті знаходиться {#AppExeName}.%n%nЗавершіть роботу {#AppExeName} та натисніть «OK» для продовження, або «Скасувати» для виходу.
I have lots of messages overridden inside the script. I would like to know what is the most effective way to transfer all those overrides into the .isl files taking into account that I have preprocessor directives {#...} used. I could use FmtMessage(...), but that means that I would have to include FmtMessage(...) for every single message.
First check, if some of the less invasive solutions might not cover your needs:
Can I use .isl files for the messages with preprocessor directives in Inno Setup?
If you want a full preprocessor support in .isl files, you can pass them through the actual Inno Setup preprocessor:
Factor out common include file (defines.iss) with all the variable definitions (and some support code):
// Definitions
#define AppVersion "1.2.3"
// more definitions ...
// Support code
#define PreprocessedTranslationFile GetEnv("TEMP") + "\lang.isl"
#define SavePreprocessedTranslation() SaveToFile(PreprocessedTranslationFile)
Include that file at the beginning of your .iss and all your .isl's:
#include "defines.iss"
Call SavePreprocessedTranslation at the end of all your .isl's:
#expr SavePreprocessedTranslation()
Make the preprocessor call iscc on the modified .isl files. It will of course fail, as the .isl is not a valid .iss, but the preprocessor part of iscc should complete and create the preprocessed .isl file.
#define DebugPreprocessLanguage 0
#define PreprocessLanguage(Path) \
Local[0] = "C:\Program Files (x86)\Inno Setup 6\ISCC.exe", \
DeleteFileNow(PreprocessedTranslationFile), \
Local[1] = DebugPreprocessLanguage ? SourcePath + "\islpreprocess.log" : "nul", \
Local[2] = "/C """"" + Local[0] + """ """ + Path + """ " + \
">> " + Local[1] + " 2>&1 """, \
Exec("cmd", Local[2], SourcePath, , SW_HIDE), \
(FileExists(PreprocessedTranslationFile) || \
Error(Path + " failed to preprocess")), \
Local[3] = GetEnv("TEMP") + "\" + ExtractFileName(Path), \
CopyFile(PreprocessedTranslationFile, Local[3]), \
DeleteFileNow(PreprocessedTranslationFile), \
Local[3]
And use the preprocessed .isl files in the [Languages] section.
[Languages]
Name: "en"; MessagesFile: {#PreprocessLanguage("Default.isl")}
Name: "nl"; MessagesFile: {#PreprocessLanguage("Dutch.isl")}
If you have problems, set DebugPreprocessLanguage to 1 to see the .isl preprocessor output.
You can even improve the process by making the preprocessor add the #include "defines.iss" and #expr SavePreprocessedTranslation() automatically to the .isl's before calling the iscc.

Delphi export to Excel - false errors in IDE for code that compiles

When coding for Excel in Delphi 10.3.3, I get false errors in the IDE for code that compiles and works just fine.
The error messages...
Undeclaired identifier 'Range' at line xxx
Undeclaired identifier 'Cells' at line xxx
...for every occurrence of the two excel variables.
Here's the complete code:
procedure tmainform.ExportToExcel;
var
xls, wb, MyRange, CompletionRow: OLEVariant;
arrData: Variant;
ColCount, CurrRow, CurrCol: Integer;
begin
ColCount:= 6;
arrData:= VarArrayCreate([1, TotOrders+1, 1, ColCount], varVariant);
for CurrCol:= 1 to ColCount do case currcol of
1: arrData[1,1]:= 'ORDER#';
2: arrData[1,2]:= 'DATE';
3: arrData[1,3]:= 'ITEM';
4: arrData[1,4]:= 'QTY';
5: arrData[1,5]:= 'COST';
6: arrData[1,6]:= 'RECEIVED?';
end;
for CurrRow:= 1 to TotOrders do begin
for CurrCol:= 1 to ColCount do begin
case currcol of
1: arrData[CurrRow+1,1]:= Orders[1].Number;
2: arrData[CurrRow+1,2]:= Orders[2].Date;
3: arrData[CurrRow+1,3]:= Orders[3].Name;
4: arrData[CurrRow+1,4]:= Orders[4].Qty;
5: arrData[CurrRow+1,5]:= Orders[5].Cost;
6: arrData[CurrRow+1,6]:= Orders[6].Received;
end;
end;
end;
xls:= CreateOLEObject('Excel.Application');
wb:= xls.Workbooks.Add;
{THIS LINE} MyRange:= wb.WorkSheets[1].Range[wb.WorkSheets[1].Cells[1, 1],wb.WorkSheets[1].Cells[TotOrders+1, ColCount]]; // THIS LINE
MyRange.Value:= arrData;
MyRange.EntireColumn.Autofit;
{THIS LINE} CompletionRow:= wb.WorkSheets[1].Range[wb.WorkSheets[1].Cells[1, 1],wb.WorkSheets[1].Cells[1, ColCount]]; // THIS LINE
CompletionRow.font.bold := true;
{THIS LINE} CompletionRow:= wb.WorkSheets[1].Range[wb.WorkSheets[1].Cells[2, 5],wb.WorkSheets[1].Cells[TotOrders+1, 5]]; // THIS LINE
CompletionRow.NumberFormat:= '$#,##0.00';
xls.Visible:= True;
xls.ActiveWindow.Activate;
end;
Global variables are:
Orders: array of ordertype;
TotOrders: integer;
Again, this code runs and works just fine, but I'd like to get rid of those fake errors always showing in the upper left.
It is a known bug in Delphi. There is nothing you can do except upgrade to version "10.4 Sydney" (or later) Reference.

Building Mplayer from sources in Linux

I've encountered a problem trying to build Mplayer from sources (svn version). I run 'configure' script with no parameters. It indicates no problems. FFmpeg compiles fine, but the last stage, that is building mplayer, fails:
ffmpeg/libavcodec/h263dec.o: In function `ff_h263_decode_frame':
h263dec.c:(.text+0xddb): undefined reference to `ff_h263_find_frame_end'
h263dec.c:(.text+0xfa0): undefined reference to `ff_mpeg4_find_frame_end'
ffmpeg/libavcodec/mlpdec.o: In function `read_access_unit':
mlpdec.c:(.text+0x128a): undefined reference to `ff_mlp_read_major_sync'
ffmpeg/libavcodec/ac3dec_fixed.o: In function `ac3_decode_frame':
ac3dec_fixed.c:(.text+0x73a3): undefined reference to `ff_ac3_parse_header'
ac3dec_fixed.c:(.text+0x7d4f): undefined reference to `ff_ac3_parse_header'
ffmpeg/libavcodec/ac3dec_float.o: In function `ac3_decode_frame':
ac3dec_float.c:(.text+0x687f): undefined reference to `ff_ac3_parse_header'
ac3dec_float.c:(.text+0x727b): undefined reference to `ff_ac3_parse_header'
ffmpeg/libavcodec/eac3_core_bsf.o: In function `eac3_core_filter':
eac3_core_bsf.c:(.text+0x7d): undefined reference to `ff_ac3_parse_header'
ffmpeg/libavcodec/eac3_core_bsf.o:eac3_core_bsf.c:(.text+0x174): more undefined references to `ff_ac3_parse_header' follow
collect2: error: ld returned 1 exit status
Makefile:747: recipe for target 'mplayer' failed
make: *** [mplayer] Error 1
The above resulted from:
cc -o mplayer command.o m_property.o mixer.o mp_fifo.o mplayer.o parser-mpcmd.o pnm_loader.o input/input.o libao2/ao_mpegpes.o libao2/ao_null.o libao2/ao_pcm.o libao2/audio_out.o libvo/aspect.o libvo/geometry.o libvo/video_out.o libvo/vo_mpegpes.o libvo/vo_null.o sub/spuenc.o libvo/vo_aa.o libao2/ao_alsa.o input/appleir.o libvo/vo_caca.o libvo/vo_dga.o libvo/vo_directfb2.o libvo/vo_dfbmga.o libvo/vo_fbdev.o libvo/vo_fbdev2.o libvo/vo_png.o libvo/vo_gif89a.o libvo/gl_common.o libvo/vo_gl.o libvo/csputils.o libvo/sdl_common.o libvo/x11_common.o libvo/vo_gl_tiled.o libao2/ao_jack.o libvo/vo_jpeg.o input/lirc.o libvo/vo_matrixview.o libvo/matrixview.o libvo/vo_md5sum.o libvo/vo_mng.o libao2/ao_nas.o udp_sync.o libao2/ao_openal.o libao2/ao_oss.o libvo/vo_pnm.o libao2/ao_pulse.o libao2/ao_sdl.o libvo/vo_sdl.o libvo/vo_tga.o libvo/vo_v4l2.o libao2/ao_v4l2.o libvo/vo_vdpau.o libvo/vo_cvidix.o libvo/vosub_vidix.o vidix/vidix.o vidix/drivers.o vidix/dha.o vidix/mtrr.o vidix/pci.o vidix/pci_names.o vidix/pci_dev_ids.o vidix/cyberblade_vid.o vidix/mach64_vid.o vidix/mga_vid.o vidix/mga_crtc2_vid.o vidix/nvidia_vid.o vidix/pm2_vid.o vidix/pm3_vid.o vidix/radeon_vid.o vidix/rage128_vid.o vidix/s3_vid.o vidix/sis_vid.o vidix/sis_bridge.o vidix/unichrome_vid.o libvo/vo_x11.o libvo/vo_xover.o libvo/vo_xv.o libvo/vo_xvidix.o libvo/vo_yuv4mpeg.o asxparser.o bstr.o codec-cfg.o cpudetect.o edl.o fmt-conversion.o m_config.o m_option.o m_struct.o mp_msg.o mp_strings.o mpcommon.o parser-cfg.o path.o playtree.o playtreeparser.o subopt-helper.o libaf/af.o libaf/af_center.o libaf/af_channels.o libaf/af_comp.o libaf/af_delay.o libaf/af_dummy.o libaf/af_equalizer.o libaf/af_extrastereo.o libaf/af_format.o libaf/af_gate.o libaf/af_hrtf.o libaf/af_karaoke.o libaf/af_pan.o libaf/af_resample.o libaf/af_scaletempo.o libaf/af_sinesuppress.o libaf/af_stats.o libaf/af_sub.o libaf/af_surround.o libaf/af_sweep.o libaf/af_tools.o libaf/af_volnorm.o libaf/af_volume.o libaf/filter.o libaf/format.o libaf/reorder_ch.o libaf/window.o libmpcodecs/ad.o libmpcodecs/ad_alaw.o libmpcodecs/ad_dvdpcm.o libmpcodecs/ad_hwac3.o libmpcodecs/ad_hwmpa.o libmpcodecs/ad_pcm.o libmpcodecs/dec_audio.o libmpcodecs/dec_teletext.o libmpcodecs/dec_video.o libmpcodecs/img_format.o libmpcodecs/mp_image.o libmpcodecs/pullup.o libmpcodecs/vd.o libmpcodecs/vd_hmblck.o libmpcodecs/vd_lzo.o libmpcodecs/vd_mpegpes.o libmpcodecs/vd_mtga.o libmpcodecs/vd_null.o libmpcodecs/vd_raw.o libmpcodecs/vd_sgi.o libmpcodecs/vd_black.o libmpcodecs/vf.o libmpcodecs/vf_1bpp.o libmpcodecs/vf_2xsai.o libmpcodecs/vf_blackframe.o libmpcodecs/vf_boxblur.o libmpcodecs/vf_crop.o libmpcodecs/vf_cropdetect.o libmpcodecs/vf_decimate.o libmpcodecs/vf_delogo.o libmpcodecs/vf_denoise3d.o libmpcodecs/vf_detc.o libmpcodecs/vf_dint.o libmpcodecs/vf_divtc.o libmpcodecs/vf_down3dright.o libmpcodecs/vf_dsize.o libmpcodecs/vf_dvbscale.o libmpcodecs/vf_eq.o libmpcodecs/vf_eq2.o libmpcodecs/vf_expand.o libmpcodecs/vf_field.o libmpcodecs/vf_fil.o libmpcodecs/vf_filmdint.o libmpcodecs/vf_fixpts.o libmpcodecs/vf_flip.o libmpcodecs/vf_format.o libmpcodecs/vf_framestep.o libmpcodecs/vf_gradfun.o libmpcodecs/vf_halfpack.o libmpcodecs/vf_harddup.o libmpcodecs/vf_hqdn3d.o libmpcodecs/vf_hue.o libmpcodecs/vf_il.o libmpcodecs/vf_ilpack.o libmpcodecs/vf_ivtc.o libmpcodecs/vf_kerndeint.o libmpcodecs/vf_mirror.o libmpcodecs/vf_noformat.o libmpcodecs/vf_noise.o libmpcodecs/vf_ow.o libmpcodecs/vf_palette.o libmpcodecs/vf_perspective.o libmpcodecs/vf_phase.o libmpcodecs/vf_pp7.o libmpcodecs/vf_pullup.o libmpcodecs/vf_rectangle.o libmpcodecs/vf_remove_logo.o libmpcodecs/vf_rgbtest.o libmpcodecs/vf_rotate.o libmpcodecs/vf_sab.o libmpcodecs/vf_scale.o libmpcodecs/vf_smartblur.o libmpcodecs/vf_softpulldown.o libmpcodecs/vf_stereo3d.o libmpcodecs/vf_softskip.o libmpcodecs/vf_swapuv.o libmpcodecs/vf_telecine.o libmpcodecs/vf_test.o libmpcodecs/vf_tfields.o libmpcodecs/vf_tile.o libmpcodecs/vf_tinterlace.o libmpcodecs/vf_unsharp.o libmpcodecs/vf_vo.o libmpcodecs/vf_yadif.o libmpcodecs/vf_yuvcsp.o libmpcodecs/vf_yvu9.o libmpdemux/aac_hdr.o libmpdemux/asfheader.o libmpdemux/aviheader.o libmpdemux/aviprint.o libmpdemux/demuxer.o libmpdemux/demux_aac.o libmpdemux/demux_asf.o libmpdemux/demux_audio.o libmpdemux/demux_avi.o libmpdemux/demux_demuxers.o libmpdemux/demux_film.o libmpdemux/demux_fli.o libmpdemux/demux_lmlm4.o libmpdemux/demux_mf.o libmpdemux/demux_mkv.o libmpdemux/demux_mov.o libmpdemux/demux_mpg.o libmpdemux/demux_nsv.o libmpdemux/demux_pva.o libmpdemux/demux_rawaudio.o libmpdemux/demux_rawvideo.o libmpdemux/demux_realaud.o libmpdemux/demux_real.o libmpdemux/demux_roq.o libmpdemux/demux_smjpeg.o libmpdemux/demux_ts.o libmpdemux/demux_ty.o libmpdemux/demux_ty_osd.o libmpdemux/demux_viv.o libmpdemux/demux_vqf.o libmpdemux/demux_y4m.o libmpdemux/ebml.o libmpdemux/extension.o libmpdemux/mf.o libmpdemux/mp3_hdr.o libmpdemux/mp_taglists.o libmpdemux/mpeg_hdr.o libmpdemux/mpeg_packetizer.o libmpdemux/parse_es.o libmpdemux/parse_mp4.o libmpdemux/video.o libmpdemux/yuv4mpeg.o libmpdemux/yuv4mpeg_ratio.o osdep/getch2.o osdep/timer-linux.o stream/open.o stream/stream.o stream/stream_bd.o stream/stream_cue.o stream/stream_file.o stream/stream_mf.o stream/stream_null.o stream/url.o sub/eosd.o sub/find_sub.o sub/osd.o sub/spudec.o sub/sub.o sub/sub_cc.o sub/subreader.o sub/vobsub.o stream/ai_alsa.o stream/ai_oss.o sub/font_load.o stream/stream_cdda.o stream/cdinfo.o stream/stream_cddb.o stream/dvb_tune.o stream/stream_dvb.o stream/stream_dvdnav.o stream/stream_dvd.o stream/stream_dvd_common.o libmpcodecs/ad_faad.o libvo/aclib.o av_helpers.o av_opts.o libaf/af_lavcac3enc.o libaf/af_lavcresample.o libmpcodecs/ad_ffmpeg.o libmpcodecs/ad_spdif.o libmpcodecs/vd_ffmpeg.o libmpcodecs/vf_geq.o libmpcodecs/vf_lavc.o libmpcodecs/vf_lavcdeint.o libmpcodecs/vf_screenshot.o libmpdemux/demux_lavf.o stream/stream_ffmpeg.o sub/av_sub.o libmpcodecs/vf_fspp.o libmpcodecs/vf_qp.o libmpcodecs/vf_spp.o libmpcodecs/vf_uspp.o sub/font_load_ft.o stream/stream_ftp.o libmpdemux/demux_gif.o libmpcodecs/vf_bmovl.o libaf/af_export.o osdep/mmap_anon.o libmpcodecs/vd_ijpg.o libaf/af_ladspa.o libmpcodecs/ad_liba52.o libmpcodecs/vf_ass.o sub/ass_mp.o sub/subassconvert.o stream/stream_bluray.o libaf/af_bs2b.o libmpcodecs/ad_libdca.o libmpcodecs/ad_libdv.o libmpcodecs/vd_libdv.o libmpdemux/demux_rawdv.o libmpcodecs/ad_libmad.o libmpcodecs/vd_libmpeg2.o stream/stream_smb.o libmpcodecs/vd_theora.o libmpdemux/demux_mng.o libmpcodecs/ad_mpg123.o stream/stream_rtsp.o stream/freesdp/common.o stream/freesdp/errorlist.o stream/freesdp/parser.o stream/librtsp/rtsp.o stream/librtsp/rtsp_rtp.o stream/librtsp/rtsp_session.o stream/stream_netstream.o stream/asf_mmst_streaming.o stream/asf_streaming.o stream/cookies.o stream/http.o stream/network.o stream/pnm.o stream/rtp.o stream/udp.o stream/tcp.o stream/stream_rtp.o stream/stream_udp.o stream/realrtsp/asmrp.o stream/realrtsp/real.o stream/realrtsp/rmff.o stream/realrtsp/sdpplin.o stream/realrtsp/xbuffer.o libmpcodecs/vd_mpng.o libmpcodecs/vf_pp.o stream/stream_pvr.o libmpcodecs/ad_realaud.o libmpcodecs/vd_realvid.o libmpcodecs/ad_speex.o stream/cache2.o stream/frequencies.o stream/stream_tv.o stream/tv.o stream/tvi_dummy.o stream/tvi_v4l2.o stream/audio_in.o sub/unrar_exec.o stream/stream_vcd.o libmpcodecs/ad_libvorbis.o libmpdemux/demux_ogg.o stream/stream_vstream.o libmpcodecs/vd_xanim.o libmpcodecs/vd_xvid4.o osdep/shmem.o ffmpeg/libpostproc/libpostproc.a ffmpeg/libavfilter/libavfilter.a ffmpeg/libavformat/libavformat.a ffmpeg/libavcodec/libavcodec.a ffmpeg/libswscale/libswscale.a ffmpeg/libswresample/libswresample.a ffmpeg/libavutil/libavutil.a -Wl,--version-script,binary.ver -Wl,-z,noexecstack -ffast-math -fpie -pie -lncurses -lrt -lgnutls -lsmbclient -lpng -lz -lmng -lz -ljpeg -lgif -lasound -ldl -lpthread -lbluray -ldvdread -lcdio_cdda -lcdio -lcdio_paranoia -lfreetype -lfontconfig -lfribidi -lass -lenca -lz -llzo2 -lmad -logg -lvorbisidec -lspeex -lgsm -ltheoradec -logg -lmpg123 -la52 -lmpeg2 -ldca -lfaad -lopus -lbs2b -lrtmp -ldv -lcrystalhd -lxvidcore -lvstream-client -lpthread -ldl -rdynamic -L/usr/lib/x86_64-linux-gnu -ldvdnav -lpthread -lm -ldirectfb -lXext -lX11 -lpthread -lXss -lXv -lvdpau -lXinerama -lXxf86vm -lXxf86dga -laa -lcaca -lSDL -lGL -ldl -laudio -lXt -lpulse -ljack -lopenal -lx264 -lpthread -lmp3lame -llirc_client
Any hints or ideas? I will appreciate any help.
ac3_parser.c, h263_parser.c in ffmpeg/libavcodec failed to compile, perhaps others. Try updating the svn version. If that doesn't work try workaround:
cd ffmpeg/libavcodec
cc -I../.. -I.. -c -o ac3_parser.o ac3_parser.c
ar rT libavcodec.a ac3_parser.o
repeat as necessary for what is missing...
cd -
make all

Fatel Error Android NDK adding Eigen/Dense

I'm using this library for attendance monitoring app. https://github.com/Lauszus/FaceRecognitionApp
I extracted SDKs to OpenCV-android-sdk & Eigen3
I'm using following commands to set environment variables:
setx OPENCV_ANDROID_SDK C:/Users/...(my path)../OpenCV-android-sdk/sdk
setx EIGEN3_DIR /path/to/eigen3 C:/Users/...(my path).../Eigen3
echo %C:/Users/...(my path)../OpenCV-android-sdk/sdk% %C:/Users/...(my path).../eigen-eigen-67e894c6cd8f%
My Android.mk fie:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OPENCV_INSTALL_MODULES := on
include $(OPENCV_ANDROID_SDK)C:/Users/Amey/AndroidStudioProjects/DevAttendance/FaceRecognitionApp/app/src/main/OpenCV-android-sdk/sdk/native/jni/OpenCV.mk
LOCAL_MODULE := face-lib
LOCAL_SRC_FILES += $(LOCAL_PATH)/face-lib.cpp $(LOCAL_PATH)/FaceRecognitionLib/Facebase.cpp
LOCAL_SRC_FILES += $(LOCAL_PATH)/FaceRecognitionLib/Eigenfaces.cpp $(LOCAL_PATH)/FaceRecognitionLib/Fisherfaces.cpp
LOCAL_SRC_FILES += $(LOCAL_PATH)/FaceRecognitionLib/PCA.cpp $(LOCAL_PATH)/FaceRecognitionLib/LDA.cpp
LOCAL_C_INCLUDES += $(EIGEN3_DIR) $(LOCAL_PATH)/FaceRecognitionLib/RedSVD/include
LOCAL_LDLIBS += -llog -ldl
LOCAL_CPPFLAGS += -std=gnu++11 -frtti -fexceptions
include $(BUILD_SHARED_LIBRARY)
I'm getting following error:
Information:Gradle tasks [:app:assembleDebug]
C:\Users\Amey\AndroidStudioProjects\DevAttendance\FaceRecognitionApp\app\src\main\cpp\face-lib.cpp
Error:(20, 10) fatal error: 'Eigen/Dense' file not found
Information:BUILD FAILED
Information:Total time: 2.354 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

Android NDK: Linking "error: undefined reference to" GLES functions

So I have the following on my Android.mk....
...
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include /Users/myname/Development/Android/android-ndk-r8c/platforms/android-14/arch-arm/usr/include
...
LOCAL_LDLIBS := -ldl -lGLESv1_CM -llog
However, when I try running ndk-build I get the following....
/Users/myname/Development/Android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libSDL.a(SDL_render_gles.o): in function GLES_CreateRenderer:jni/SDL/src/render/opengles/SDL_render_gles.c:189: error: undefined reference to 'glDisableClientState'
collect2: ld returned 1 exit status
This of course appears to be an issue linking, however, the compiler worked just fine. I am confused as to why the linking wouldn't work but the compilation would. Anyonw know how I could fix it?
From ndk-build V=1 >Build.log Output
UPDATE:
Ok so I am taking the code found here this compiles fine, however, I am trying to upgrade to PRBoom+ so I dl the code from here and tweak the Android.mk to include the new classes. Once this is done it seems to compile fine, however, it fails to properly link. There are two main errors I see...
First is involving multiple definitions, however, the original (compiled linked fine) code had the same multiple definitions....
/Users/me/Development/Android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: ./obj/local/armeabi/objs-debug/prboom_jni/w_mmap.o: multiple definition of 'W_InitCache'
The other type is the OpenGL issues...
/Users/me/Development/Android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libSDL.a(SDL_render_gles.o): in function GLES_ResetState:/Users/jackiegleason/Development/Code/prboom4android-base/jni/SDL/src/render/opengles/SDL_render_gles.c:181: error: undefined reference to 'glDisable'
If I copy everything back (using the prboom4android code) everything compiles and links just fine.
Here is a diff of the 2 Android.mk files...
< LOCAL_C_INCLUDES:= $(LOCAL_PATH) $(LOCAL_PATH)/include $(LOCAL_PATH)/../SDL_net/include $(LOCAL_PATH)/../SDL/include $(LOCAL_PATH)/MUSIC $(LOCAL_PATH)/MUSIC/include $(LOCAL_PATH)/TEXTSCREEN $(LOCAL_PATH)/TEXTSCREEN/include
---
> LOCAL_C_INCLUDES:= $(LOCAL_PATH) $(LOCAL_PATH)/include $(LOCAL_PATH)/../SDL_net/include $(LOCAL_PATH)/../SDL/include
28c28
< f_finale.c p_enemy.c p_spec.c r_plane.c w_mmap.c i_capture.c \
---
> f_finale.c p_enemy.c p_spec.c r_plane.c w_mmap.c \
31,36c31,33
< m_bbox.c p_inter.c p_tick.c r_things.c z_zone.c s_advsound.c memio.c \
< d_client.c i_video.c i_network.c i_system.c PCSOUND/pcsound.c PCSOUND/pcsound_sdl.c SDL/i_sshot.c \
< i_main.c sc_man.c SDL/i_sound.c jni_doom.c mus2mid.c pcm2wav.c e6y.c SDL/i_joy.c \
< r_screenmultiply.c hu_tracers.c i_smp.c g_overflow.c i_pcsound.c \
< MUSIC/dbopl.c MUSIC/flplayer.c MUSIC/portmidiplayer.c MUSIC/midifile.c MUSIC/opl_queue.c MUSIC/vorbisplayer.c MUSIC/dumbplayer.c MUSIC/oplplayer.c MUSIC/madplayer.c MUSIC/opl.c \
< TEXTSCREEN/txt_button.c TEXTSCREEN/txt_separator.c TEXTSCREEN/txt_gui.c TEXTSCREEN/txt_widget.c TEXTSCREEN/txt_checkbox.c TEXTSCREEN/txt_radiobutton.c TEXTSCREEN/txt_inputbox.c TEXTSCREEN/txt_spinctrl.c TEXTSCREEN/txt_window.c TEXTSCREEN/txt_desktop.c TEXTSCREEN/txt_scrollpane.c TEXTSCREEN/txt_io.c TEXTSCREEN/txt_strut.c TEXTSCREEN/txt_window_action.c TEXTSCREEN/txt_dropdown.c TEXTSCREEN/txt_sdl.c TEXTSCREEN/txt_label.c TEXTSCREEN/txt_table.c
---
> m_bbox.c p_inter.c p_tick.c r_things.c z_zone.c \
> d_client.c i_video.c i_network.c i_system.c \
> i_main.c i_sound.c jni_doom.c mmus2mid.c pcm2wav.c
Yes, I could download your Build.log.
Your build uses APP_PLATFORM = android-3, which does not have the necessary GL libraries. You can set APP_PLATFORM = android-14 in your Application.mk, or set the target platform for your Android project (Eclipse will update the project.properties file).
You should not add the android-14 includes manually in your Android.mk. When you have correct APP_PLATFORM, the include path will be adjusted accordingly.

Resources