0

My project is using native code in Android. I try to use std::vector in one of my files and got error as "fatal error: vector: No such file or directory". I followed all discussions here. My Application.mk is

APP_STL := stlport_shared
LIB_TEST_DIR := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_PATH := $(LIB_TEST_DIR)

LOCAL_MODULE := usb_camera_simple_native

LOCAL_MODULE_FILENAME := libusb_camera_simple_native

LOCAL_CPP_EXTENSION := .cpp .cc .cxx

LOCAL_C_INCLUDES := $(LOCAL_PATH)/include

LOCAL_CFLAGS := -DHAVE_CONFIG_H

LOCAL_SRC_FILES := com_astralink_orcas_api_UsbCamera.c

include $(BUILD_SHARED_LIBRARY)

My path setting is as shown in the attached image. My file where vector header is included is as follow.

#ifndef _ACCESSORIES_H_
#define _ACCESSORIES_H_
#include <vector>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct{
     int col;
     int row;
     int width;
     int height;
}loc_rects;
typedef struct{

     int numofppl;
     int camera_idx;
     unsigned char *frame;//image buffer
     std::vector<loc_rects> locs;
}container;


#ifdef __cplusplus
}
#endif
#endif
Community
  • 1
  • 1
batuman
  • 7,066
  • 26
  • 107
  • 229

0 Answers0