Fatal error vector no such file or directory

Help and assistance with Microsoft Visual Studio, cross-platform Arduino compatible development with GDB, WiFi and Serial Debugging. 100's of extensions such as team code sharing, unit testing. Multi-platform and multi-architecture build system. Firmware Disassembly Viewer, Memory Inspection, Digital, Analog, I2C, Memory and other lives views. Live charting of running micro-controller code.

Normal Topic compiler error: vector: No such file or directory (Read 2999 times)


redTractor

Newbies

*
Offline

Posts: 1

Joined: Mar 24th, 2017

compiler error: vector: No such file or directory

Mar 24th, 2017 at 9:46pm

Print Post
 

I am attempting to build a project using the std::vector library. When compiling I get the following error:

fatal error: vector: No such file or directory
   #include <vector>
   compilation terminated
Error compiling project sources

I have tried compiling with Deep Search turned off and on, there is no difference in the result. 

The project includes other library’s which are located in the «Arduinolibraries» folder, and those compile just fine. It seems like there is an issue finding libraries located in the directory:

C:Program Files (x86)Microsoft Visual Studio 12.0VCinclude

(which is where all of the standard C libraries are located) 

I modified my Configuration Properties for the linker and added the VS include directory to the «Additional Library Directories» search path (see attachment). Still no luck…

Any input or recommendations would be greatly appreciated. 

Thanks,
-Chris

« Last Edit: Mar 24th, 2017 at 9:47pm by redTractor »  


Please Register or Login to the Forum to see File Attachments

Back to top

IP Logged
 


Tim@Visual Micro

Administrator

*****
Offline

Posts: 11684
Location: United Kingdom

Joined: Apr 10th, 2010

Re: compiler error: vector: No such file or directory

Reply #1 — Mar 24th, 2017 at 9:56pm

Print Post
 

Hi,

That isn’t how arduino works. 

It can be confusing with the vs intellisense which shows standard windows intellisense along with arduino. It’s possible to switch that off in the paths «include» paths dialog.

However you can not change the intellisense paths themselves because visual micro has to automatically updated them with lib and hardware paths etc. (depending on what the code uses and what board/architecture is set)

There is actually no need to ever set any paths for arduino and you also can not set any paths in the arduino ide.

The arduino has very little memory compared to a windows machine therefore you will find a cut down version of c++ as documented on the arduino.cc and applicable gcc web sites.

If you switch on vmicro>compiler>verbose, after a build you will see where sources are compiled from and will see there is no mention of any windows paths in the -I compiler includes.

Sorry can be of more help. 

Back to top

WWW
 

IP Logged
 

Когда я пытаюсь включить любой вектор С++, такой как вектор, в свой проект Android NDK (используя NDK r5b, последний), я получаю сообщение об ошибке, подобное следующему…

Compile++ thumb : test-libstl <= test-libstl.cpp
/Users/nitrex88/Desktop/Programming/EclipseProjects/STLTest/jni/test-libstl.cpp:3:18: error: vector: No such file or directory

Другие люди, которые сообщили об этом в Интернете, заявили об успехе, добавив

APP_STL := stlport_static

в файл Application.mk. Я сделал это, а также попробовал любую другую возможную ценность для APP_STL. Я очистил проект, запустил ndk-build clean, удалил папки obj и libs, и все же, когда компилирую его, он не может найти векторный класс. Я работаю над этим уже несколько недель (так как вышел NDK r5), и я был бы очень признателен, если бы у кого-то были какие-то советы. Спасибо!

04 фев. 2011, в 02:17

Поделиться

Источник

7 ответов

Это возможно. Вот несколько шагов:

В $PROJECT_DIR/jni/Application.mk:

APP_STL                 := stlport_static

Я попытался использовать stlport_shared, но не повезло. То же самое с libstdС++.

В $PROJECT_DIR/jni/Android.mk:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := hello-jni
LOCAL_SRC_FILES := hello-jni.cpp
LOCAL_LDLIBS    := -llog

include $(BUILD_SHARED_LIBRARY)

Ничего особенного здесь, но убедитесь, что ваши файлы .cpp.

В $PROJECT_DIR/jni/hello-jni.cpp:

#include <string.h>
#include <jni.h>
#include <android/log.h>

#include <iostream>
#include <vector>


#define  LOG_TAG    "hellojni"
#define  LOGI(...)  __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
#define  LOGE(...)  __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)


#ifdef __cplusplus
extern "C" {
#endif

// Comments omitted.    
void
Java_com_example_hellojni_HelloJni_stringFromJNI( JNIEnv* env,
                                                  jobject thiz )
{
    std::vector<std::string> vec;

    // Go ahead and do some stuff with this vector of strings now.
}

#ifdef __cplusplus
}
#endif

Единственное, что меня укусил, было #ifdef __cplusplus.

Смотрите каталоги.

Чтобы скомпилировать, используйте ndk-build clean && ndk-build.

Sebastian Roth
08 фев. 2011, в 10:10

Поделиться

Если вы используете Android-студию, и вы все еще видите сообщение «error: vector: Нет такого файла или каталога» (или другие связанные с stl ошибки) при компиляции с помощью ndk, тогда это может вам помочь.

В своем проекте откройте файл build.gradle модуля (не ваш проект build.grade, а тот, который для вашего модуля), и добавьте stl stlport_shared в элемент ndk в defaultConfig.

Например,

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.domain.app"
        minSdkVersion 15
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"

        ndk {
            moduleName "myModuleName"
            stl "stlport_shared"
        }
    }
}

rlcoder
23 март 2015, в 07:10

Поделиться

Я использую Android Studio, и по состоянию на 19 января 2016 года это помогло мне. (Это похоже на то, что меняется каждый год или около того)

Перейти к: app → Gradle Скрипты → build.gradle(Module: app)

Затем в модели {… android.ndk {… и добавьте строку: stl = «gnustl_shared»

Вот так:

model {

    ...

    android.ndk {
        moduleName = "gl2jni"
        cppFlags.add("-Werror")
        ldLibs.addAll(["log", "GLESv2"])
        stl = "gnustl_shared"     //  <-- this is the line that I added
    }

    ...

}

kynnysmatto
19 янв. 2016, в 00:14

Поделиться

Даже Себастьян дал хороший ответ еще 3 года назад, я все же хотел бы поделиться новым опытом здесь, если вы столкнетесь с той же проблемой, что и я, в новой версии ndk.

У меня есть ошибка компиляции, например:

fatal error: map: No such file or directory
fatal error: vector: No such file or directory

Моей средой является android-ndk-r9d и adt-bundle-linux-x86_64-20140702.
Я добавляю файл Application.mk в одну и ту же папку jni и вставляю одну (и только одну) строку:

APP_STL := stlport_static

Но, к сожалению, это не решает мою проблему!
Я должен добавить эти 3 строки в Android.mk, чтобы решить эту проблему:

ifndef NDK_ROOT
include external/stlport/libstlport.mk
endif

И я увидел хороший обмен из здесь, в котором говорится: «stlport_shared» является предпочтительным». Возможно, это лучшее решение для использования stlport в качестве общей библиотеки вместо статического. Просто добавьте следующие строки в Android.mk, а затем нет необходимости добавлять файл Application.mk.

ifndef NDK_ROOT
include external/stlport/libstlport.mk
endif
LOCAL_SHARED_LIBRARIES += libstlport

Надеюсь, что это будет полезно.

gary
18 авг. 2014, в 12:01

Поделиться

Позвольте мне немного добавить к ответ Себастьяна Рота.

Ваш проект может быть скомпилирован с помощью ndk-build в командной строке после добавления кода, опубликованного Sebastian. Но для меня были синтаксические ошибки в Eclipse, и у меня не было завершения кода.

Обратите внимание, что ваш проект должен быть преобразован в проект C/С++.

Как преобразовать проект C/С++

Чтобы устранить эту проблему, щелкните правой кнопкой мыши на своем проекте, выберите «Свойства»

Выберите C/С++ Общие → Контуры и символы и включите каталоги ${ANDROID_NDK}/sources/cxx-stl/stlport/stlport для включения

Нажмите «Да», когда появится диалоговое окно.

Изображение 114699

До

Изображение 114700

После

Изображение 114701

Обновление # 1

GNU C. Добавить каталоги, перестроить. Не будет ошибок в исходных файлах C
GNU С++. Добавить каталоги, перестроить. Ошибок в исходных файлах CPP не будет.

Maksim Dmitriev
13 дек. 2013, в 13:04

Поделиться

Если вы используете ndk r10c или новее, просто добавьте APP_STL = С++ _ static в Application.mk

clark.li
08 янв. 2015, в 05:13

Поделиться

Ещё вопросы

  • 1SVM регрессия быстрее в Python
  • 0Как воспроизведение метафайлов работает в GDI
  • 1MVC мешают обновлять определенные поля
  • 0Как кодировать URL в AngularJs
  • 1модульное тестирование атрибутов валидатора dataannotations
  • 1getRingerMode () всегда возвращает значение 0
  • 1Заставить класс иметь конструктор
  • 1Форматирование XML для отображения в TextView?
  • 0Проблема цикла Chart.js, PHP и JSON
  • 1Использование PhoneGap для мобильного приложения для редактирования видео
  • 1Проблемы с xPage NotesContext getDatabase ACL
  • 0Доступ к значениям содержимого $ при создании темы Drupal
  • 1Task.WhenAll — Когда использовать этот
  • 1(jqGrid) Ошибка при поиске номера строки, по которой щелкнули
  • 0проверка имени пользователя и пароля
  • 0Как поставить рамку вокруг всей клетки?
  • 1манипулирование яркостью в цветовом пространстве YUV
  • 1Как присвоить значения массиву numpy как функцию индекса?
  • 1Извлечение индексов столбцов, где dtype это «объект» в Pandas
  • 1Struts2 возвращает json, если аутентификация в перехватчике не удалась
  • 1Добавление TextViews в TableLayout «наращиваемый»
  • 0доступ к коллекции внутри json объекта углового
  • 1Получение только целых чисел при делении кадра данных панд на ряд панд
  • 0C ++ — доступ к значениям в динамических массивах
  • 0Установка опции выбора из .css (‘font-family’)
  • 0Показывать пользователю только первые несколько секунд видео для незарегистрированных пользователей
  • 1Привязать селектор длинного списка к результату метода POST
  • 0Перегрузка оператора C ++ со ссылкой на значение
  • 1Hanning (by Hann) окно
  • 0Получить данные из объекта $ .ajax
  • 0XPath Wildcards для HTML
  • 1цитирование отдельных символов (слов) в строке на Java-скрипте
  • 0Как лучше организовать C ++ Socket Server?
  • 0JQuery Ajax успеха не будет стрелять вместо того, чтобы завершить работу события
  • 0опционально с элементом списка ионов
  • 0ошибка множественного определения при связывании проекта C ++
  • 0Правильный переход к элементам в одном блоке
  • 1Невозможно получить доступ к моему логическому списку
  • 1Керас пользовательская функция потери вызова скрытого слоя плотных операций
  • 1Войти в Jabber-сеть
  • 0Проблема конфигурации opencv 2.4.3 в Visual Studio 2010
  • 1отправить значения TextBox из FormB в DataGridView в FormA
  • 0CKEditor JQuery не обновляет значения
  • 0Разбор ответа JSON в jQuery только для первого значения
  • 0php mysql — вставить один запрос из цикла while
  • 1Как получить поле EditText, предварительно заполненное после нажатия кнопки «Назад»
  • 0Как вводить данные SQL, только если ввод не пустой
  • 0Наведите курсор на один элемент div, измените цвет другого, но затемните все элементы div, которые не отображаются
  • 0PhoneGap / JQueryMobile приложение сборки теряет стиль
  • 1Как запустить функцию в обратном вызове fs.stat

Сообщество Overcoder

View previous topic :: View next topic  
Author Message
urcindalo
l33t
l33t

Joined: 08 Feb 2005
Posts: 614
Location: Almeria, Spain

PostPosted: Mon Dec 03, 2012 9:04 am    Post subject: vector.h not found when compiling a scientific source code Reply with quote

Hi and thanks for reading this.

I’m trying to compile a science program not in portage, because it needs a signed academic license faxed to the author.

The program itself is small and seems pretty straight forward to compile: just a «make» with the provided «Makefile» will do it.

This is the Makefile content:

Code:
#

CC = g++                           # apply the GNU C++ compiler

#

OBJECT = main.o

         basic.o

         score.o

         parameter.o

         input.o

         ligand.o

         logp.o

         misc.o

         molecule.o

         population.o

         protein.o

         utilities.o

#

LIB = -lm

#   

xscore: $(OBJECT)

   $(CC) $(OBJECT) $(LIB) -o xscore

#

main.o: main.c xtool.h

basic.o: basic.c xtool.h

score.o: score.c xtool.h

parameter.o: parameter.c xtool.h

input.o: input.c xtool.h

ligand.o: ligand.c xtool.h

logp.o: logp.c xtool.h

misc.o: misc.c xtool.h

molecule.o: molecule.c xtool.h

population.o: population.c xtool.h

protein.o: protein.c xtool.h

utilities.o: utilities.c xtool.h

#

And this is the xtool.h header:

Code:
# include <stdio.h>

# include <stdlib.h>

# include <string.h>

# include <string>

# include <math.h>

# include <ctype.h>

# include <time.h>

# include <vector.h>

# define TRUE 1

When issuing the «make» command I got this:

Code:
$ make

g++                               -c -o main.o main.c

In file included from main.c:14:0:

xtool.h:8:21: fatal error: vector.h: No such file or directory

compilation terminated.

make: *** [main.o] Error 1

As you can see, vector. h is not found. In fact, there’s no vector.h in my /usr/include directory.

How can I solve this? I found some vector.h possible candidates:

Code:
$ sudo equery f gcc | grep vector.h

/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_bvector.h

/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_vector.h

/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4/profile/impl/profiler_list_to_vector.h

I tried symlinking the three of them to /usr/include/vector.h, to no avail.

Any help is greatly appreciated.

Back to top

View user's profile Send private message

megabaks
Apprentice
Apprentice

Joined: 22 Jan 2012
Posts: 253
Location: Russia && Saint-Petersburg

PostPosted: Mon Dec 03, 2012 9:16 am    Post subject: Reply with quote

Code:
[ root@desktop ] megabaks # e-file /usr/include/vector.h

 *  sci-mathematics/4ti2

   Available Versions:   1.3.2 1.3.2-r1

   Homepage:      http://www.4ti2.de/

   Description:      Software package for algebraic, geometric and combinatorial problems

   Matched Files:      /usr/include/Vector.h; /usr/include/vector.h;

[ root@desktop ] megabaks #

Back to top

View user's profile Send private message

urcindalo
l33t
l33t

Joined: 08 Feb 2005
Posts: 614
Location: Almeria, Spain

PostPosted: Mon Dec 03, 2012 10:11 am    Post subject: Reply with quote

Thanks very much for your help. After installing 4ti2 I get this errors:

Code:
$ make

g++                               -c -o main.o main.c

In file included from main.c:14:0:

xtool.h:406:2: error: ‘vector’ does not name a type

xtool.h:407:2: error: ‘vector’ does not name a type

xtool.h:438:2: error: ‘vector’ does not name a type

xtool.h:463:2: error: ‘vector’ does not name a type

xtool.h:465:2: error: ‘vector’ does not name a type

xtool.h:466:2: error: ‘vector’ does not name a type

xtool.h:488:2: error: ‘vector’ does not name a type

xtool.h:685:2: error: ‘vector’ does not name a type

xtool.h:687:2: error: ‘vector’ does not name a type

xtool.h:688:2: error: ‘vector’ does not name a type                                                                           

xtool.h:849:2: error: ‘vector’ does not name a type                                                                           

xtool.h:852:2: error: ‘vector’ does not name a type                                                                           

xtool.h:855:2: error: ‘vector’ does not name a type                                                                           

xtool.h:857:2: error: ‘vector’ does not name a type                                                                           

xtool.h:858:2: error: ‘vector’ does not name a type

main.c: In function ‘int Xtool_Functions(int, char**)’:

main.c:70:66: warning: deprecated conversion from string constant to ‘char*’

main.c:74:72: warning: deprecated conversion from string constant to ‘char*’

main.c: In function ‘int Xtool_Utilities(int, char**)’:

main.c:141:44: warning: deprecated conversion from string constant to ‘char*’

main.c:178:44: warning: deprecated conversion from string constant to ‘char*’

main.c:203:61: warning: deprecated conversion from string constant to ‘char*’

main.c:221:61: warning: deprecated conversion from string constant to ‘char*’

make: *** [main.o] Error 1

As an example, lines 406 and 407 in the errors above from xtool.h belong to this code:

Code:
class Ring

{

 public:

   int valid;   // 0 = invalid; 1 = valid

   int type;   // 1 = normal; 2 = aromatic

   int num_member;

   vector <int> atom_id;   // atom id in this ring  ————> Line 406

   vector <int> bond_id;   // bond id in this ring  ————> Line 407

   float centroid[3];

   Ring(); ~Ring();

   Ring(const Ring &original);

        Ring& operator = (const Ring &original);

   void Clear();

   void Show_Contents() const;

};

Is vector.h from 4ti2 really the file xtool.h needs?

My programming knowledge and skills are rather limited.

=======

UPDATE

I see this in vector.h:

Code:
typedef int vector_t;

typedef vector_t *Vector;

So, I replaced every instance of «vector» in xtool.h by «vector_h», and now I get these errors:

Code:
xtool.h:406:2: error: ‘vector_t’ is not a template

xtool.h:407:2: error: ‘vector_t’ is not a template

Back to top

View user's profile Send private message

leo.the_zoo
Apprentice
Apprentice

Joined: 04 Jul 2005
Posts: 160
Location: Poland

PostPosted: Mon Dec 03, 2012 11:46 am    Post subject: Reply with quote

UPDATE: In the Makefile I see «xscore» name.

I dug here and there through google and everything tells me that they use STL vectors, so you should 1) change vector.h to vector and 2) add «using namespace std;» line in xtool.h.

At least this will make it compile (with string conversion warning-o-plenty, though).
Back to top

View user's profile Send private message

urcindalo
l33t
l33t

Joined: 08 Feb 2005
Posts: 614
Location: Almeria, Spain

PostPosted: Mon Dec 03, 2012 1:23 pm    Post subject: Reply with quote

Yes, the program is X-Score.

I tried your suggestions, so I changed «# include <vector.h>» to «# include <vector>» in the original xtool.h and I added this line to it:

Code:
# define SIGN(a,b) ((b)>=0.0 ? fabs(a):-fabs(a))

using namespace std;   ———> Line added right after the «#include» and «#define» lines but before anything else

// ************************* functions ********************************

With these changes I get the same errors than when I replaced the «vector» instances to «vector_t» in xtool.h after installing 4ti2. So I de-installed 4ti2 along with its dependencies, tried again but got exactly the same errors:

Code:
$ make

g++                               -c -o main.o main.c

In file included from main.c:14:0:

xtool.h:408:2: error: ‘vector_t’ does not name a type

xtool.h:409:2: error: ‘vector_t’ does not name a type

Back to top

View user's profile Send private message

leo.the_zoo
Apprentice
Apprentice

Joined: 04 Jul 2005
Posts: 160
Location: Poland

PostPosted: Mon Dec 03, 2012 2:14 pm    Post subject: Reply with quote

So you used a previously modified xtool.h (vector->vector_t). Please revert this change and it should be alright.
Back to top

View user's profile Send private message

urcindalo
l33t
l33t

Joined: 08 Feb 2005
Posts: 614
Location: Almeria, Spain

PostPosted: Mon Dec 03, 2012 3:20 pm    Post subject: Reply with quote

leo.the_zoo wrote:
So you used a previously modified xtool.h (vector->vector_t). Please revert this change and it should be alright.

You’re right. I thought I had reverted the changes but I just forgot :oops:

Thanks very much. Now it compiled and launches :D

Back to top

View user's profile Send private message

leo.the_zoo
Apprentice
Apprentice

Joined: 04 Jul 2005
Posts: 160
Location: Poland

PostPosted: Mon Dec 03, 2012 11:18 pm    Post subject: Reply with quote

To make C++ language purists happy, I’d like to add that a much nicer solution would be adding std:: before every declaration of vector type variable that are present only in xutils.h and protein.c files. Therefore, this sed command ran in c++ directory on original files should do the trick:

Code:
sed -i «/^#sinclude/s/vector.h/vector/;s/svector/std::vector/» xtool.h protein.c

Back to top

View user's profile Send private message

urcindalo
l33t
l33t

Joined: 08 Feb 2005
Posts: 614
Location: Almeria, Spain

PostPosted: Tue Dec 04, 2012 9:19 am    Post subject: Reply with quote

You’re the man!! :D
Back to top

View user's profile Send private message

rdlady
n00b
n00b

Joined: 12 Aug 2013
Posts: 1

PostPosted: Mon Aug 12, 2013 1:39 pm    Post subject: Reply with quote

I had exactly the same problem. I applied the replacement using the command line from leo.the_zoo and it worked like a charm in my Linux! Thanks!

However, I still get some warning messages during the compilation, I hope those these are not going to change the results of my analysis:

$ make

g++ -c -o main.o main.c

main.c: In function ‘int Xtool_Functions(int, char**)’:

main.c:70:66: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

main.c:74:72: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

main.c: In function ‘int Xtool_Utilities(int, char**)’:

main.c:141:44: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

main.c:178:44: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

main.c:203:61: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

main.c:221:61: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

… (and this continues for several lines…)

g++ main.o basic.o score.o parameter.o input.o ligand.o logp.o misc.o molecule.o population.o protein.o utilities.o -lm -o xscore

Also, in Mac OSX, when I try compile the Xscore with gcc 4.7 or 4.8, I get this error:

$ make

g++ -c -o main.o main.c

make: *** [main.o] Segmentation fault: 11

I’m using a remote Linux machine to deal with this problem, but I would like to find out what is causing this problem when I try to compile xscore on my Macbook (OSX version 10.7.5 and gcc48).

Back to top

View user's profile Send private message

Hu
Moderator
Moderator

Joined: 06 Mar 2007
Posts: 19773

PostPosted: Tue Aug 13, 2013 1:44 am    Post subject: Reply with quote

rdlady wrote:
Code:
$ make

g++                               -c -o main.o main.c

main.c: In function ‘int Xtool_Functions(int, char**)’:

main.c:70:66: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

main.c:74:72: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

main.c: In function ‘int Xtool_Utilities(int, char**)’:

main.c:141:44: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

main.c:178:44: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

main.c:203:61: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

main.c:221:61: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

Change the prototype of the called function to take a const char*. String constants are immutable. Attempting to write to one will crash the program, so the callee should be declared as const char* to flag any code which would otherwise try to write to the string constant.

rdlady wrote:
Also, in Mac OSX, when I try compile the Xscore with gcc 4.7 or 4.8, I get this error:

Code:

$ make

g++                               -c -o main.o main.c

make: *** [main.o] Segmentation fault: 11

I’m using a remote Linux machine to deal with this problem, but I would like to find out what is causing this problem when I try to compile xscore on my Macbook (OSX version 10.7.5 and gcc48).

This appears to be a crash of gcc. You should raise this issue with the entity that provided your OSX gcc.

Back to top

View user's profile Send private message

Display posts from previous:   

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

фатальная ошибка: вектор: нет такого файла или каталога

У меня есть проект Android, состоящий из большого количества собственного кода на C++. Однако я не могу собрать свою библиотеку, так как она не может найти заголовочный файл vector.h. В чем может быть проблема ? Образец моих включений почти на всех страницах.

#include <jni.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <vector>

Компилятор может найти все остальные заголовочные файлы, кроме vector.h, в каждом файле. Любые предложения о том, где я иду не так?

ПРИМЕЧАНИЕ. Имена файлов заканчиваются на .cpp а я уже пробовал #include <vector.h> , #include "vector.h"

Благодаря !

Проблема была окончательно решена путем создания Application.mk в папке проекта JNI и добавления к нему следующего: —

APP_STL := stlport_static

Подробнее см. это вопрос по SO

ответ дан 23 мая ’17, 12:05

Не тот ответ, который вы ищете? Просмотрите другие вопросы с метками

build
android-ndk
compiler-errors
makefile

or задайте свой вопрос.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Fatal error vcl h no such file or directory
  • Fatal error uuid h no such file or directory
  • Fatal error upon loading installer executable
  • Fatal error unknown error during init
  • Fatal error unit1 pas 7 circular unit reference to unit1 pas

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии