error uploading sketch #<StandardCplusplus\vector> //vectors

hi, good day. i mistakenly posted my error to the wrong section. i hope this is the right section for my error.

(copy from other section post)

Hi, good day. I'm very very new to arduino, but I was successful at some uploads to mega 2560 boards, until this one. I tried uploading a sketch from the net, and it never uploads.

What I have done so far:

  1. copied the libraries that came with the .ino file that I was trying to upload to mega 2560. (failed)
  2. uninstalled arduino IDE then reinstalled, then do the #1 above step. (failed)

Arduino versions tried so far:
Arduino version: 1.8.5
Arduino version: 1.8.6
Arduino Version: 1.8.6 non-admin version (the one that needs no installation)

error message from arduino IDE:

attached file (error message from arduino IDE 1.8.6)

the code part I was getting error:

#include <Wire.h>    //Include the software serial library for white sheild
#include <Adafruit_NeoPixel.h>
#include <LiquidCrystal.h> //lib for interfacing with LCD screen
#include <SPI.h> //Suppoting lib for SD card
#include <SD.h> //SD card API
#include <StandardCplusplus.h> //STD
#include <StandardCplusplus\vector> //Vectors
#include <StandardCplusplus\ctime> //Time helper
#include <ArduinoJson\ArduinoJson.h> //Arduno Json (aka epic)
#include <DS3231.h> //Real time clock lib

attached is the error message from arduino IDE 1.8.6
i hope somebody could point me on the right direction..please.

ps.: please show me how to remove my post on the other section. thanks everybody.

error message.txt (8.19 KB)

well - the compiler is pretty clear on what the issue is:

DROMatic:15:46: error: StandardCplusplus\vector: [color=red]No such file or directory[/color]

this comes from your directive#include <StandardCplusplus\vector> //Vectors

Visual C++ and tools on the microsoft windows side may be are able to cope with this, but I've never tested an include with a backslash (), if you think everything is installed correctly, try with a forward slash (/) in your includes as this is the typical way#include <StandardCplusplus/vector> //Vectors

As it does not seem to complain for ctime and ArduinoJson.h - may be it's supported, then verify that you do have a vector file (exactly name like this) in StandardCplusplus directory in the various standard location the compiler will look into

EDIT:

I had a quick look at GCC doc and they state

2.1 Include Syntax

Both user and system header files are included using the preprocessing directive ‘#include’. It has two variants:

#include
This variant is used for system header files. It searches for a file named file in a standard list of system directories. You can prepend directories to this list with the -I option (see Invocation).

#include "file"
This variant is used for header files of your own program. It searches for a file named file first in the directory containing the current file, then in the quote directories and then the same directories used for . You can prepend directories to the list of quote directories with the -iquote option.

The argument of ‘#include’, whether delimited with quote marks or angle brackets, behaves like a string constant in that comments are not recognized, and macro names are not expanded. Thus, #include <x/*y> specifies inclusion of a system header file named x/*y.

However, if backslashes occur within file, they are considered ordinary text characters, not escape characters. None of the character escape sequences appropriate to string constants in C are processed. Thus, #include "x\n\y" specifies a filename containing three backslashes. (Some systems interpret ‘\’ as a pathname separator. All of these also interpret ‘/’ the same way. It is most portable to use only ‘/’.)

It is an error if there is anything (other than comments) on the line after the file name.

==> On which OS are you running ?

hi J-M-L, thanks for your help, but nothing seems to work for me. the "" changed to "/", the variants of #include <StandardCplusplus\vector> and #include "StandardCplusplus\vector" doesn't work either. by the way, I'm on Win10.

attached are screenshots of the arduino IDE with the strange thing happening while changing from "" to "/" , please notice the color of "ctime". again, your help is greatly appreciated.

1.JPG

2.JPG

your images:

8cbf3b50920f538ef75f62397390c0e4a13145d4.jpg

and

8d2f90ea1eaa6cda27b45319f9ad2c66382a8e24.jpg

don't worry about the colors, the IDE just puts colors on things it recognizes as keywords and is not very smart about it.

the question is more what is in your file system.... can you screen grab the content of the library and more specifically what's in the StandardCplusplus directory

attached are the screen grab inside the folder "StandardCplusplus"

ctime.JPG

vector.JPG

your images as I hate downloading stuff :slight_smile:

f9aa79c0cb5c363cca5d64e8a1209a5e61debdab.jpg

aa0d8d1e0f0daa19e881db64bb20ad514fbbaa12.jpg

OK so you do have a vector file. what's in it ? do you have by any chance a vector.h as well? if so include that instead of just vector...

where is the source of the tutorial / code you are taking that from ?

J-M-L, you are a big help,just so you know. but nothing seems to work yet, but I'm learning something here.

i don't have a "vector.h" file since its just a port library for arduino from uClibc++, as to whats inside it, I honestly don't know. I'll send you the github link to where i got the source code from, I hope that is ok with you, you can answer me here on forums anyways, right?

no need for PM

so this is your source environment (DRO-Matic)

that's very weird to include standard libraries that way and this might confuse the IDE.

I would get rid of the whole thingy and download the real libraries from their authors

Adafruit_NeoPixel
ArduinoJson
DS3231
LiquidCrystal

those ones are standard with the IDE, so don't even bother...
SD
SPI

and this StandardCplusplus seems to add no value... I'd get rid of it totally. Let the compiler include the libraries it needs.

hi J-M-L, thanks. I understand what you are saying, i guess. but as to how to do it, i'm sure i don't really know. please point me in the right direction.

hi everybody, I am still unable to fix the problem, so i hope there is someone who can help me out. thanks in advance

this is a massive modification with ramifications.. would require changing many small things here and there in the includes...if you don't get code and how includes work that's probably out of reach...

you are probably tricked by the way the the IDE handles files and the author probably did use visual studio on windows.

Hi, good day. he actually did use visual studio. i went pass through those previous errors, but now i got another one, see attached file please. it is something to do with the istream, ostream etc. those files are under StandardCplusplus folder still. by the way, i am now using visual studio with arduino extension. thanks again

error message.txt (2.66 KB)