Fatal error vcl h no such file or directory

I'm looking to compile some old source code in Visual C++. However, the first of many errors I am receiving is: vcl.h: No such file or directory This appears to be in reference to the Visual Com...

I’m looking to compile some old source code in Visual C++. However, the first of many errors I am receiving is:

vcl.h: No such file or directory

This appears to be in reference to the Visual Component Library, native to Borland compilers it seems. I downloaded the free Borland C++ 5.5 command line compiler, but it doesn’t seem to contain a vlc.h in its include directory.

How can I resolve my issue? Many thanks.

Johan's user avatar

Johan

73.9k23 gold badges189 silver badges313 bronze badges

asked Aug 9, 2010 at 14:57

Jones's user avatar

2

This old code must have come from C++Builder. If it actually uses the VCL, you won’t be able to build it with any other compiler. If there are other VCL includes like classes.hpp, system.hpp, controls.hpp, etc. it is using the VCL.

If it is a console application and doesn’t actually use any VCL classes, then you can probably just remove the include, but the chances are slim.

answered Aug 9, 2010 at 17:10

David Dean's user avatar

David DeanDavid Dean

2,66223 silver badges33 bronze badges

Borland C++ 5.5 and C++ Builder are two different products.

The VCL components are in the C++ Builder product and can’t be compiled with Borland C++ 5.5 which is a pure C/C++ compiler (I think OWL is included there).

So you have to get your hands on C++ Builder to be able to compile it.

answered Aug 14, 2010 at 13:10

Max Kielland's user avatar

Max KiellandMax Kielland

5,5378 gold badges55 silver badges95 bronze badges

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
#include <vcl.h>
#include <iostream.h>
#include <conio.h>
#include <stdio.h>
#pragma hdrstop
 
struct sotrudnic
{
        char* lastname;
        char* firstname;
        char* name;
        char* dolshnost;
        int age;
        int plata;
};
 
void filewrite();
void fileread();
void filedelete();
void addbegin();
char* Rus (char*);
 
//---------------------------------------------------------------------------
 
#pragma argsused
int main()
{
        int choice = -1;
        while (choice !=0)
        {
                cout << Rus ("выберите действие:n1 - забить сотрудника в файл n2 - удалить сотрудника по фамилииn3 - дописать в файл двух сотрудниковn4 - прочесть файлn0 - выход");
                cout << endl;
                cout << Rus("Ваш выбор: ");
                cin >> choice;
                cout << endl;
                if (choice == 2)
                {
                         filedelete();
                }
                else if (choice==1)
                {
                         filewrite();
                }
                else if (choice==4)
                {
                         fileread();
                }
                else if (choice == 3)
                {
                        addbegin();
                }
        };
        cout << Rus ("нажмите любую клавишу для продолжения");
        getch();
        return 0;
}
//---------------------------------------------------------------------------
 
char* Rus (char* text)
{
        char* tmp = new char[256];
        CharToOem (text, tmp);
        return tmp;
}
 
void filewrite()
{
        int k;
        FILE *stream;
        sotrudnic p[100];
        cout << Rus("Введите количество сотрудников: ");
        cin >> k;
        if ((stream = fopen("patient.txt", "wb")) == NULL)
        {
                cerr << Rus("Ошибка при попытки записи в файл.n");
        }
       
        fwrite(&k,sizeof(k),1,stream);
        cout << endl;
 
        for (int i = 0; i < k ; i++)
        {
                char* ln = new char[20];
                char* fn = new char[20];
                char* pn = new char[20];
                char* dolshnost = new char[20];
                char* ln1 = new char[20];
                char* fn1 = new char[20];
                char* pn1 = new char[20];
                char* dolshnost1 = new char[20];
                cout << Rus("Фамилия сотрудника ") << i+1 << ": ";
                cin >> ln;
                OemToChar(ln, ln1);
                p[i].lastname = ln1;
                cout << Rus("Имя сотрудника ") << i+1 << ": ";
                cin >> fn;
                OemToChar(fn, fn1);
                p[i].firstname = fn1;
                cout << Rus("Отчество сотрудника ") << i+1 << ": ";
                cin >> pn;
                OemToChar(pn, pn1);
                p[i].name= pn1;
                cout << Rus("Введите должность сотрудника ") << i+1 << ": ";
                cin >> dolshnost;
                OemToChar(dolshnost, dolshnost1);
                p[i].dolshnost = dolshnost1;
                cout << Rus("Введите возраст сотрудника ") << i+1 << ": ";
                cin >> p[i].age;
                cout << Rus("Введите зароботную плату сотрудника") << i+1 << ": ";
                cin >> p[i].plata;
                fwrite(&p[i], sizeof(p[i]), 1, stream);
                cout << endl;
        }
        fclose(stream);
        fileread();
}
 
void fileread()
{
        int k;
        FILE *stream;
        sotrudnic pat[100];
        if ((stream = fopen("patient.txt", "rb")) == NULL)
        {
               cerr << Rus("Неозможно открыть файл.n");
        }
        fread(&k, sizeof(k), 1, stream);
        for (int i =0 ; i<k; i++)
        {
                fread(&pat[i], sizeof(pat[i]), 1, stream);
                cout << i+1 << " " <<  Rus(pat[i].lastname) << " " << Rus(pat[i].firstname) << " " << Rus(pat[i].name)<< " " << Rus(pat[i].dolshnost) << " " <<
                pat[i].age << " " << pat[i].plata << endl;
        }
        fclose(stream);
        cout << endl;
}
 
void filedelete()
{
        char k;
        char* l;
        l = new char[100];
        FILE *stream;
        sotrudnic pat[100];
        cout << Rus("Введите фамилию сотрудника которогт нужно удалить: ");
        cin >> l;
        cout << endl;
        if ((stream = fopen("patient.txt", "rb")) == NULL)
        {
                cerr << Rus("Невозмоно открыть файл для чтения.n");
        }
        fread(&k, sizeof(k), 1, stream);
        for (int i =0 ; i < k; i++)
        {
                fread(&pat[i], sizeof(pat[i]), 1, stream);
        }
        fclose(stream);
        k--;
        if ((stream = fopen("patient.txt", "wb")) == NULL)
        {
                cerr << Rus("невозмоно изменить файл.n");
        }
        fwrite(&k, sizeof(k), 1, stream);
 
        for (int i = 0 ; i < k+1; i++)
        if (pat[i].lastname != l)
        {
                fwrite(&pat[i], sizeof(pat[i]), 1, stream);
        }
        fclose(stream);
        cout << Rus("сотрудник успешно удален") << endl << endl;
        fileread();
}
 
void addbegin()
{
        int k;
        int l = 0;
        FILE *stream;
        sotrudnic p[100];
        if ((stream = fopen("patient.txt", "rb")) == NULL)
        {
                cerr << Rus("Невозмоно открыть файл для чтения.n");
        }
        fread(&k, sizeof(k), 1, stream);
        for (int i=2 ; i < k+2; i++)
                fread(&p[i], sizeof(p[i]), 1, stream);
        fclose(stream);
        k+=2;
        if ((stream = fopen("patient.txt", "wb")) == NULL)
        {
                cerr << Rus("Невозможно изменить файл.n");
        }
        fwrite(&k,sizeof(k), 1, stream);
                cout << endl;
                char* ln = new char[20];
                char* fn = new char[20];
                char* pn = new char[20];
                char* dolshnost = new char[20];
                char* ln1 = new char[20];
                char* fn1 = new char[20];
                char* pn1 = new char[20];
                char* dolshnost1 = new char[20];
              //  for (int yy = 0; yy <= sizeof(p); yy++)
              //  {
              //         p[yy + 1] = p[yy];
              // }
              //  int q;
 
               // cout << Rus("В какое место добавим?: ");
              //  cin >> q;
                for (int q = 0;q < 2;q++)
                {
                cout << Rus("Фамилия сотрудника: ");
                cin >> ln;
                OemToChar(ln, ln1);
                p[q].lastname = ln1;
                cout << Rus("имя: ");
                cin >> fn;
                OemToChar(fn, fn1);
                p[q].firstname= fn1;
                cout << Rus("отчество: ");
                cin >> pn;
                OemToChar(pn, pn1);
                p[q].name= pn1;
                cout << Rus("должность: ");
                cin >> dolshnost;
                OemToChar(dolshnost, dolshnost1);
                p[q].dolshnost = dolshnost1;
                cout << Rus("возраст: ");
                cin >> p[q].age;
                cout << Rus("зароботная плата: ");
                cin >> p[q].plata;
                fwrite(&p[q], sizeof(p[q]), 1, stream);
                }
                for (int i=2 ; i < k; i++)
                {
                fwrite(&p[i], sizeof(p[i]), 1, stream);
                }
                fclose(stream);
                cout << Rus("сотрудник успешно добавлен") << endl << endl;
                fileread();
}

Содержание

  1. Thread: vcl.h
  2. compiler?
  3. Common C++ Error Messages #1 – No such file or directory
  4. “.h: No such file or directory” – 2 Easy fixes to Arduino error
  5. No such file error!
  6. Decoding the no such file error
  7. The error of our ways
  8. Scenario 1 – Fat fingers
  9. Scenario 2 – Missing files
  10. Other library locations
  11. Review
  12. Michael James
  13. The Programming Electronics Academy
  14. Are you ready to use Arduino from the ground up?
  15. 24 Comments

Thread: vcl.h

Thread Tools
Search Thread
Display

i m trying to run the programm written by some other person, because my professor asked me to do some changing,

and there is error coming about header of vcl.h

means #include couldnt be find.

I dont know how to solve it,,

I am wondering if you guys can help,

I gave you thanx in advance..

compiler?

What compiler are you using? Different ones accept different stuff

means it couldnt find the file..

———————Configuration: Hystproj — Win32 Debug———————
Compiling.
Hystproj.cpp
F:Inthyst projectQuelltextIntecHystHystproj.cpp(2) : fatal error C1083: Cannot open include file: ‘vcl.h’: No such file or directory
Error executing cl.exe.

Hystproj.obj — 1 error(s), 0 warning(s)

hmmmm im getting the same error try putting a space?

but right now i dont belive it is a correct header but I’m not the best programmer so wait till someone comes along

Last edited by cookie12; 12-02-2005 at 07:33 PM .

If you get the same error, then as the error says: there is no such file, so you have to find that file and insert it into your project.

Not standard. It will probably come standard with Borland compilers, because it’s a Borland library.

Last edited by SlyMaelstrom; 12-02-2005 at 08:23 PM .

actually i am using Visual studio 6,,and it has been written in visual c++. i am really confused

vcl.h is a Borland specific header — without one of the various Borland Builders you won’t have it nor be able to use it. Which leaves you with a few choices:

You could try commenting out the vcl.h line and see whether it’s actually used or not (maybe your code doesn’t actually use any vcl components).

You could rewrite the code without the Borland specific stuff.

Buy/borrow a copy of a version of Borland builder compatible with the vcl components referenced in your code.

I tried to make it comment,,but i got 34 different errors after that,, so it is for sure that, i need this,

But actually those guys also wrote it in visual c++,

and re writting all this stuff, could take more than 20 days..

Источник

Common C++ Error Messages #1 – No such file or directory

Introduction

In this intermittent series, I’ll be looking at the most common error messages your C++ compiler (and linker) can produce, explaining exactly what they mean, and showing how they can be fixed (or, better still avoided). The article will specifically talk about the errors produced by the GCC command line compiler, but I’ll occasionally provide some coverage of Microsoft C++ as well. The articles are aimed at beginner to intermediate C++ programmers, and will mostly not be OS-specific.

Error Messages 101

Compiler error messages from the GCC g++ compiler generally look like something this:

which was produced by this code:

The first line of the error says which function the following error(s) is in. The error message itself comes in four main parts; the file the error occurs in, the line number and character offset at which the compiler thinks the error occurs, the fact that it is an error, and not a warning, and the text of the message.

As well as error, the compiler can also produce warnings. These are usually about constructs that, while not being actually illegal in C++, are considered dubious, or constructs that the compiler has extensions to cover. In almost all cases, you don’t want to use such constructs, and you should treat warnings as errors; in other words, your code should always compile with zero warnings. You should also increase the level of warnings from the compiler’s default, which is usually too low. With g++, you should use at least the -Wall and -Wextra compiler options to do this:

No such file or directory

The error I’m looking at today most commonly occurs when you are including a header file using the preprocessor #include directive. For example, suppose you have the following code in a file called myfile.cpp:

and you get the following error message:

What could be causing it? Well, the basic cause is that the compiler cannot find a file called myheader.h in the directories it searches when processing the #include directive. This could be so for a number of reasons.

The simplest reason is that you want the compiler to look for myheader.h in the same directory as the myfile.cpp source file, but it can’t find it. this may be because you simply haven’t created the header file yet, but the more common reason is that you either misspelled the header file name in the #include directive, or that you made a mistake in naming the header file when you created it with your editor. Look very closely at the names in both the C++ source and in your source code directory listing. You may be tempted to think «I know that file is there!», but if the compiler says it isn’t there, then it isn’t, no matter how sure you are that it is.

This problem is somewhat greater on Unix-like system, such as Linux, as there file names are character case sensitive, so Myheader.h, MyHeader.h, myheader.h and so on would all name different files, and if you get the case wrong, the compiler will not look for something «similar». For this reason, a very good rule of thumb is:

Never use mixed case when naming C++ source and header files. Use only alphanumeric characters and the underscore when naming C+++ files. Never include spaces or other special characters in file names.

Apart from avoiding file not found errors, this will also make life much easier if you are porting your code to other operating systems which may or may not respect character case.

The wrong directory?

Another situation where you may get this error message is if you have split your header files up from your C++ source files into separate directories. This is generally good practice, but can cause problems. Suppose your C++ project is rooted at C:/myprojects/aproject, and that in the aproject directory you have two sub-directorys called src (for the .cpp files) and inc (for the header files), and you put myfile.cpp in the src directory, and myheader.h in the inc directory, so that you have this setup:

Now if you compile the source myfile.cpp from the src directory, you will get the «No such file or directory» error message. The C++ compiler knows nothing about the directory structures of your project, and won’t look in the inc directory for the header. You need to tell it to look there somehow.

One thing some people try when faced with this problem is to re-write myfile.cpp so it looks like this:

or the slightly more sophisticated:

Both of these are a bad idea, as they tie your C++ code to the project’s directory structure and/or location, both of which you will probably want to change at some point in the future. If the directory structure does change, you will have to edit all your #include directories.The better way to deal with this problem is to tell the compiler directly where to look for header files. You can do that with the compiler’s -I option, which tells the compiler to look in the specified directory, as well as the ones it normally searches:

Now the original #include directive:

will work, and if your directory structure changes you need only modify the compiler command line. Of course, writing such command lines is error prone, and you should put such stuff in a makefile, the use of which is unfortunately outside the scope of this article.

Problems with libraries

Somewhat similar issues to those described above can occur when you want to use a third-party library. Suppose you want to use the excellent random number generating facilities of the Boost library. If you are copying example code, you may well end up with something like this in your C++ source file:

This will in all probability lead to yet another «No such file or directory» message, as once again the compiler does not know where «boost/random.hpp» is supposed to be. In fact, it is one of the subdirectories of the Boost installation, and on my system I can get the #include directive to work using this command line:

where /prog/boost1461 is the root directory for my specific Boost library installation.

Can’t find C++ Standard Library files?

One last problem that beginners run into is the inability of the compiler to find header files that are part of the C++ Standard Library. One particular favourite is this one:

where you are learning C++ from a very, very old book. Modern C++ implementations have not contained a file called iostream.h for a very long time indeed, and your compiler is never going to find it. You need to use the correct, standard names for such headers (and to get a better book!):

If this still fails, then there is almost certainly something very wrong with your GCC installation. The GCC compiler looks for Standard Library files in a subdirectory of its installation, and locates that directory relative to the directory containing the compiler executable, so if the Standard Library headers are available, the compiler should always find them.

Conclusion

This article looked at the «No such file or directory» message of the GCC C++ compiler. If you get this message you should:

  • Remember that the compiler is always right in situations like this.
  • Look very closely at the file name to make sure it is correct.
  • Avoid naming file using mixed-case or special characters.
  • Use the -I compiler option to tell the compiler where to look for files.
  • Make sure that GCC is correctly installed on your system.

Источник

“.h: No such file or directory” – 2 Easy fixes to Arduino error

It’s 11 PM on a Wednesday. You’ve just spent three hours toiling on your next Arduino project, and FINALLY, you’re ready to give your sketch a whirl. You hit upload, palms sweaty with anticipation to see all your hard work come to fruition. It’s then you see the error:

No such file or directory.

Surely this is a chance aberration. “Nothing to worry about,” you mutter, sleep-starved and semi-delirious as you hit upload again. And once more, those maddening words, “no such file or directory,” stare back at you in hostile gaslighting mockery.

Have you been here?

If you’re trying to run an Arduino sketch but keep coming across the “no such file or directory” error, don’t worry. This is actually a pretty common problem, and there are two easy fixes that almost always work.

Keep on reading. We’ll show you what they are.

No such file error!

Error messages can be such a pain. They do, however, serve a useful purpose by telling us something about what went wrong. At first glance, the no such file or directory error is particularly maddening because it seems to break that useful purpose rule. Of course there’s a file or directory! You just made the thing, and it’s right there, tucked inside a directory.

But hold up, let’s take a closer look. If you look at the bottom portion of the Arduino IDE where the error message shows up, there’s this handy little button that says “copy error messages.”

Click on that now. You probably won’t fall off your chair to learn that by clicking that button, you just copied the error message from the little window at the bottom of The Serial Monitor’s UI to the clipboard of your computer.

This copy feature is ridiculously useful. You could, for example, paste the error message into Google and learn more about the error. Or you could take advantage of the active Arduino community by asking for help in a forum. For this situation, however, we can be a bit more basic. All we’re going to do is take a closer look at what the message is actually saying. To do that, just fire up your PC’s text editor and paste it into the blank screen.

Decoding the no such file error

Here it is, that pesky error in all its freshly pasted glory.

I’ll break it down for you line by line.

  • The first line is easy. It’s just describing the Arduino version in use, what operating system is running, and which board you have selected.
  • Line 2 begins to zero in on the problem.
    • The first bit, “knob,” is referring to the name of the program. This is your sketch, basically.
    • The second bit is what usually begins to confuse people, but it’s easy once you know. The “10” in this example is telling you the error occurred on line 10 of your sketch. The “19” is telling you the length of the line of code in spaces and characters. The first number is usually the more helpful of the two because you can use it to locate the error in your sketch.
  • Then we get to the smoking gun of the error. It says, “servo.h: No such file or directory”.

So this thing, “Servo.h.” That’s the thing we need to fix, and thanks to line 2, we know where to find it. Line 10. It’s always line 10.

Now that we know what’s going on a bit better, let’s get down to the business of implementing a fix.

The error of our ways

Let’s lay down some scrutiny on this accursed line 10.

It says “#include ”

When we verify this code, this line is telling the Arduino IDE compiler, “Hey, for this program to work, you need to go get this file called servo.h”.

Let’s say you had a label-making machine, and you wanted to use it to print some cool motivational labels, like “Success!” and “Keep Trying!” and “Look, Nachos!” To make that happen, you’ll first have to load in a roll of labels. No roll of labels? Well, then the label maker isn’t gonna work.

The sketch you’re trying to upload is like the label maker. The file (in our example, the file named “servo.h”) is the roll of labels.

So the error message actually is saying something useful. It’s saying, “Hey programmer, you said I needed this other file. Well, I looked for it and it’s not there. What gives?”

Now we know the error message isn’t complete gibberish, let’s look at the two most common scenarios that cause it.

Scenario 1 – Fat fingers

This sketch is one that you’ve written. You’re actually the one who wrote the “#include” line. The first thing you should check is your spelling and capitalization. Maybe you spelled the name of the library incorrectly? Or (as with the example below) perhaps you capitalized the wrong letters.

So “servo.h” should actually have a capital “S.” In full and with correct capitalization, it should read, “Servo.h.” You’ll notice above that the word servo changes color when it’s correctly capitalized. That color change signifies that the library name “Servo” is recognized as a “keyword” in the Arduino IDE.

Keep in mind that might not be the case for all the libraries you’re using. In other words, the color change won’t always indicate you’re using the right spelling or capitalization, but it’s often a helpful visual reminder.

Oh, and it’s probably good to mention that everyone in the history of Arduino programming has misspelled or incorrectly capitalized a word at some point. It’s amazing how long you can stare at a line of code and miss something like that.

So don’t sweat it.

Scenario 2 – Missing files

This brings us to the next common scenario for the “no such file or directory” error.

So often, working with Arduinos involves taking code that someone else has developed and shared online and then tailoring it to your project. That’s part of what makes it so easy to get stuff done with Arduino. One problem that frequently happens when we do that, however, is we accidentally introduce code without a matching file.

An easy way to check to see if you have the file a sketch is looking for is to navigate to Sketch > Include Library from within the Arduino IDE. Then look for the name of that library.

Whatever library the #include statement was calling for, you want to look through this big long list for a library with the exact same name. If you don’t see the file name there, this means the library isn’t installed. You’ll have to add that library before the sketch will compile without errors.

So, how do you add that library?

The easiest way is to go to Sketch > Include Library > Manage Libraries. The Arduino IDE will open up a dialogue box from which you can search for the library you need.

Make sure you type the exact word that matches the #include line. Once you find the missing library, go ahead and click Install. The Arduino IDE will let you know that it’s installing the library you requested and updating the software accordingly.

Next, just double-check that the library has been successfully installed by going to Sketch > Include Library. You should see your new library in the dropdown list.

Good news! If the library is there, you should now be able to compile your sketch error-free.

Other library locations

OK, there’s one little fly in the ointment. How do these dang ointment flies always manage to complicate things so?

Here’s the thing. Not all libraries live in this convenient pop-up window inside the Arduino IDE. The Arduino community is bubbling with clever ideas, but cleverness (unlike processed cheese) doesn’t always come in conveniently standardized, individually wrapped slices. There are tons of different ways to find Arduino libraries on the web.

If you’re downloading or copying a program from the internet, just go to the page where you got that program and take a close look at the library the author is referencing. They may, for example, have a link to GitHub, which is a place where people keep a lot of code libraries.

Wherever you find it, usually the library will be included in a .zip file package. Once you’ve downloaded the .zip file, fire up the Arduino IDE and go to Sketch > Include Library > Add .ZIP library. Then navigate to the location you downloaded the file and select it. Assuming no additional ointment flies invade your workflow, the Arduino IDE will pop up the message “Library added to your libraries” just above the dark area where the original “no such file or directory” error appeared.

Now it’s business as usual! Just go to Sketch > Include Library, and the new library will appear in the drop-down list.

As the dyslexic Frenchman once said to the oversized violinist: “Viola!”

You now know not one but two ways to add a new library. What a time to be alive!

Review

A quick recap, then.

We’ve looked at the two main scenarios that cause the “no such file or directory” error to appear after you compile your sketch:

  • The fat fingers phenomenon: Check your spelling and capitalization! If you wrote the sketch, there’s a mighty good chance you introduced a tiny error. And don’t beat yourself up over it! Literally every coder has done this.
  • The missing files mixup: Failing that, if you copied code from someone else check that you have the correct libraries installed. Don’t see your library? Install it using the method described above, and you should be good to go.

There may be no such thing as a free lunch, a coincidence, or a luck dragon. But rest assured. Your files and directories? They’re alive and well.

Michael James

Proud Member of

The Programming Electronics Academy

The place where we help you get started and scale the mountain of knowledge of the Arduino Platform. That means we teach what is practical , what is useful , and what will get you off to a running start.
Learn more About Us Here

Are you ready to use Arduino from the ground up?

(without spending days going down YouTube rabbit holes)

  • Learn the 2 most important Arduino programming functions
  • Get familiar with Arduino coding
  • Understand your Arduino hardware
  • Learn the Arduino software setup
  • 12 engaging video lessons

Should you decide to sign up, you’ll receive value packed training emails and special offers.

Wait for it. we’ll be redirecting you to our Training Portal

Great video showing how to include libraries and search libraries if you don’t see a library in your sketch book.
Please keep up the great work. Making Arduino code writing easier.
Thanks,
Jack Brockhurst

Thanks Jack! We’ll do our best to keep them coming.

Great tips! thanks for the tutorials.

Thanks Daniel! I am glad it was helpful.

Tutorials are very comprehensive! Thanks!!

Thank you Juven! I am glad they helped!

Very clear and helpfull
Thanks ! !

Hi, I have the same problem: no such file or directory when trying to run ‘Keypad’, so I noticed it wasn’t written in orange.

I see that I didn’t have it in my library (closest thing was Keyboard) so I went to the library manager and downloaded it.

This time it’s in orange, ran the code again, same message. (. )

Tried to put the code in by clicking on it from the Sketch –> Include etc, and a weird thing happens: first row: #include written in black, and second row: #include written in orange.

I’m trying to use it for a 4×4 keypad

Same. Did you find the fix already?

// reset ESP8266 WiFi connection AT+CIPMUX=1 AT+CWJAP

String cmd=”AT+CWJAP=”, EngineersGarage “,”01234567672″”;

lcd.print(” SENDING DATA”);

lcd.print(” TO CLOUD”);

// TCP connection AT+CIPSTART=4,”TCP”,”184.106.153.149″,80

String cmd = “AT+CIPSTART=4,”TCP”,””;

cmd += “184.106.153.149”; // api.thingspeak.com

String getStr = “GET /update?api_key=”;

// send data length

// thingspeak needs 15 sec delay between updates

in this program i got an error expected initializer before string constant

Liquid crystal _I2C.h :No such file or directory
Did all thibg but it is not happening

Arduino: 1.8.15 (Mac OS X), Board: “Arduino Uno”

Multiple libraries were found for “Usb.h”
checkm8-a5:4:10: fatal error: Constants.h: No such file or directory
Used: /Users/sana/Documents/Arduino/libraries/USB_Host_Shield_2.0
#include “Constants.h”
^

compilation terminated.
Not used: /Users/sana/Documents/Arduino/libraries/USB_Host_Shield_Library_2.0
Not used: /Users/sana/Documents/Arduino/libraries/USBHost
exit status 1
Constants.h: No such file or directory

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

Looks like you may not have your Constants.h file in your sketch folder?

j’ai suivi la démarche a la lettre mais je ne suis pas arrivé
a trouver la bibliothèque RFID.
avez vous une idée ou je peux la trouver
merci

I followed the process to the letter but I did not arrive
find the RFID library.
do you have an idea where i can find it
thank you

Is there a specific RFID library you are working with? Do you have a link to its GitHub repo by chance?

I am having trouble with the Radiohead RFM95 encrypted client example, seems Speck.h shows as no such file or directory. I can find code for Speck.h but not as a file I can drop in my library. I imagine there is a way to create the right file type in VS but I am not familiar with how to do that, assuming that would even do the trick. I would appreciate a little help here as I am rather new to Arduino and C++.

Here is the sample library:
// LoRa Simple Hello World Client with encrypted communications
// In order for this to compile you MUST uncomment the #define RH_ENABLE_ENCRYPTION_MODULE line
// at the bottom of RadioHead.h, AND you MUST have installed the Crypto directory from arduinolibs:
// http://rweather.github.io/arduinolibs/index.html
// Philippe.Rochat’at’gmail.com
// 06.07.2017

#include
#include
#include

RH_RF95 rf95; // Instanciate a LoRa driver
Speck myCipher; // Instanciate a Speck block ciphering
RHEncryptedDriver myDriver(rf95, myCipher); // Instantiate the driver with those two

float frequency = 868.0; // Change the frequency here.
unsigned char encryptkey[16] = <1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16>; // The very secret key
char HWMessage[] = “Hello World ! I’m happy if you can read me”;
uint8_t HWMessageLen;

void setup()
<
HWMessageLen = strlen(HWMessage);
Serial.begin(9600);
while (!Serial) ; // Wait for serial port to be available
Serial.println(“LoRa Simple_Encrypted Client”);
if (!rf95.init())
Serial.println(“LoRa init failed”);
// Setup ISM frequency
rf95.setFrequency(frequency);
// Setup Power,dBm
rf95.setTxPower(13);
myCipher.setKey(encryptkey, sizeof(encryptkey));
Serial.println(“Waiting for radio to setup”);
delay(1000);
Serial.println(“Setup completed”);
>

void loop()
<
uint8_t data[HWMessageLen+1] = <0>;
for(uint8_t i = 0; i Michael James on April 16, 2022 at 1:17 pm

OK, here is what I did to get it compiling.

I went here: https://github.com/kostko/arduino-crypto
And downloaded that library, unzipped it into my Arduino/libraries folder, and renamed the enclosing folder to from arduino-crypto-master to just Crypto.
(the Arduino IDE library manager gave me a different library than that it seems – which didn’t have the Speck.h file)

Then, as per the comments in your sketch, I uncommented that line in the RadioHead.h file (it was like ALL the way at the bottom – a couple lines up)

Then I was able to verify this sketch ok.

sketch_oct15a:5:31: fatal error: LiquidCrystal_I2C.h: No such file or directory
#include

compilation terminated.
exit status 1
LiquidCrystal_I2C.h: No such file or directory

Sir I am facing this problem whenever I am trying to upload this program – Arduino 1.8.19 with “NodeMCU 1.0(ESP-12E Module)”-ESP8266 Boards (2.5.2)

Have you installed the LiquidCrystal_I2C library?

To install it, in the Arduino IDE you would go to “Tools > Manage Libraries” and then search for that library and click install.

I still have this error! I did 10-check, and nothing! Keypad.h is orange, it’s like Arduino sees it, but NO! I have this error:
Arduino: 1.8.12 (Windows 10), Board: “Arduino Uno”

swanky_juttuli1:1:10: fatal error: Keypad.h: No such file or directory

exit status 1
Keypad.h: No such file or directory

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.
Help me please.

Hmmm – do you have multiple keypad libraries installed?

Источник

  1. 12-02-2005


    #1

    saime_aley is offline


    Registered User


    i m trying to run the programm written by some other person, because my professor asked me to do some changing,

    and there is error coming about header of vcl.h

    means #include<vcl.h> couldnt be find.

    I dont know how to solve it,,

    I am wondering if you guys can help,

    I gave you thanx in advance..


  2. 12-02-2005


    #2

    cookie12 is offline


    Registered User


    compiler?

    What compiler are you using? Different ones accept different stuff


  3. 12-02-2005


    #3

    saime_aley is offline


    Registered User


    this error is coming,

    means it couldnt find the file..

    ———————Configuration: Hystproj — Win32 Debug———————
    Compiling…
    Hystproj.cpp
    F:Inthyst projectQuelltextIntecHystHystproj.cpp(2) : fatal error C1083: Cannot open include file: ‘vcl.h’: No such file or directory
    Error executing cl.exe.

    Hystproj.obj — 1 error(s), 0 warning(s)


  4. 12-02-2005


    #4

    cookie12 is offline


    Registered User


    hmmmm im getting the same error try putting a space? but right now i dont belive it is a correct header but I’m not the best programmer so wait till someone comes along

    Last edited by cookie12; 12-02-2005 at 07:33 PM.


  5. 12-02-2005


    #5

    7stud is offline


    Registered User


    Try:

    #include «vcl.h»

    If you get the same error, then as the error says: there is no such file, so you have to find that file and insert it into your project.


  6. 12-02-2005


    #6

    SlyMaelstrom is offline


    Devil’s Advocate

    SlyMaelstrom's Avatar


    Either this.

    or the Visual Component Library…
    http://en.wikipedia.org/wiki/Visual_Component_Library
    http://www.visualcomponentlibrary.com/

    Not standard. It will probably come standard with Borland compilers, because it’s a Borland library.

    Last edited by SlyMaelstrom; 12-02-2005 at 08:23 PM.

    Sent from my iPad�


  7. 12-03-2005


    #7

    saime_aley is offline


    Registered User


    actually i am using Visual studio 6,,and it has been written in visual c++,,,,i am really confused


  8. 12-03-2005


    #8

    Ken Fitlike is offline


    erstwhile


    vcl.h is a Borland specific header — without one of the various Borland Builders you won’t have it nor be able to use it. Which leaves you with a few choices:

    You could try commenting out the vcl.h line and see whether it’s actually used or not (maybe your code doesn’t actually use any vcl components).

    You could rewrite the code without the Borland specific stuff.

    Buy/borrow a copy of a version of Borland builder compatible with the vcl components referenced in your code.

    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.


  9. 12-03-2005


    #9

    saime_aley is offline


    Registered User


    I tried to make it comment,,but i got 34 different errors after that,, so it is for sure that, i need this,

    But actually those guys also wrote it in visual c++,

    and re writting all this stuff, could take more than 20 days..

    I am nog getting the way…


  10. 12-03-2005


    #10

    dwks is offline


    Frequently Quite Prolix

    dwks's Avatar


    hmmmm im getting the same error try putting a space?

    Actually, spaces don’t really matter:

    Code:

    #include<iostream>
    # include <fstream>

    If you get the same error, then as the error says: there is no such file, so you have to find that file and insert it into your project.

    The OP would need the library, too, not just the header file. It’s like everyone asking «Where can I get DOS.H?»

    But actually those guys also wrote it in visual c++,

    Well, not with your version.

    and re writting all this stuff, could take more than 20 days..

    How do you know? Maybe it’ll only take 19.

    If you don’t want to convert it to compile under MSVC 6, then download a Borland compiler.

    dwk

    Seek and ye shall find. quaere et invenies.

    «Simplicity does not precede complexity, but follows it.» — Alan Perlis
    «Testing can only prove the presence of bugs, not their absence.» — Edsger Dijkstra
    «The only real mistake is the one from which we learn nothing.» — John Powell

    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.


  11. 09-18-2015


    #11

    jholler is offline


    Registered User


    Import Library (.lib)

    Can a .lib that was built with Borland Builder++ be used in another compiler if the .lib build linked in VCL?


  12. 09-21-2015


    #12

    Elkvis is offline


    Registered User


    It’s 2015. Get a new compiler. Visual C++ 6.0 was released in 1998, and has long been obsolete. VCL will not work with Microsoft’s compiler. If you want to develop Windows applications in C++, look into Qt. Qt is free, open source, and supports a multitude of platforms, including all the major mobile device platforms.

    What can this strange device be?
    When I touch it, it gives forth a sound
    It’s got wires that vibrate and give music
    What can this thing be that I found?


    msm.ru

    Нравится ресурс?

    Помоги проекту!

    !
    Правила раздела Visual C++ / MFC / WTL (далее Раздела)

    >
    Исходники

    • Подписаться на тему
    • Сообщить другу
    • Скачать/распечатать тему

      


    Сообщ.
    #1

    ,
    04.09.04, 05:44

      Скачиваю исходники с разных сайтов, но при кампиляции выводит всегда ошибку:
      fatal error C1083: Cannot open include file: ‘vcl.h’: No such file or directory.
      а) Почему? :wall:
      б) Как с этим бороться? :o


      GazOn



      Сообщ.
      #2

      ,
      04.09.04, 05:56

        Либо такого файла нет, либо не правильно подключаешь.
        Файлы проекта подключаются так:
        # include «vcl.h»
        А файлы библиотеки так(из папки include):
        # include <vcl.h>

        Сообщение отредактировано: Gazon — 04.09.04, 06:02


        UncleBob



        Сообщ.
        #3

        ,
        04.09.04, 10:29

          Riddler, потому что у тебя исходник для Builder, а ты его пытаешься собрать в Visual Studio ;)


          cozy



          Сообщ.
          #4

          ,
          04.09.04, 10:49

            Насколько я знаю

            VCL — это библиотека C++ Builder, а ты пытаешься скомпилировать под Visual C++
            Ессное дело он не находит этот файл

            Так что ищи исходники для VC++, а не для билдера

            P.S. блин, опоздал…

            Сообщение отредактировано: cozy — 04.09.04, 10:49


            GazOn



            Сообщ.
            #5

            ,
            04.09.04, 10:59

              Цитата Uncle_Bob,4.09.04, 14:29

              Riddler, потому что у тебя исходник для Builder, а ты его пытаешься собрать в Visual Studio ;)

              А я то думал он свой файл не может подключить, ввиду того, что не знал, что VCL — это библиотека C++ Builder :D

              0 пользователей читают эту тему (0 гостей и 0 скрытых пользователей)

              0 пользователей:

              • Предыдущая тема
              • Visual C++ / MFC / WTL
              • Следующая тема

              Рейтинг@Mail.ru

              [ Script execution time: 0,0194 ]   [ 16 queries used ]   [ Generated: 9.02.23, 16:49 GMT ]  

              Я хочу скомпилировать старый исходный код в Visual C ++. Однако первая из многих получаемых мной ошибок:

              vcl.h: No such file or directory
              

              Похоже, это относится к библиотеке визуальных компонентов, родной для компиляторов Borland. Я загрузил бесплатный компилятор командной строки Borland C ++ 5.5, но, похоже, он не содержит vlc.h в своем каталоге include.

              Как я могу решить свою проблему? Большое спасибо.

              2 ответы

              Этот старый код, должно быть, был взят из C ++ Builder. Если он действительно использует VCL, вы не сможете собрать его ни с каким другим компилятором. Если есть другие VCL, такие как classes.hpp, system.hpp, controls.hpp и т. Д., Он использует VCL.

              Если это консольное приложение и на самом деле использование любые классы VCL, то вы, вероятно, можете просто удалить включение, но шансы невелики.

              ответ дан 09 авг.

              Borland C ++ 5.5 и C ++ Builder — два разных продукта.

              Компоненты VCL находятся в продукте C ++ Builder и не могут быть скомпилированы с помощью Borland C ++ 5.5, который является чистым компилятором C / C ++ (я думаю, что OWL туда включен).

              Поэтому вам нужно заполучить C ++ Builder, чтобы скомпилировать его.

              ответ дан 14 авг.

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

              c++
              visual-c++
              c++builder
              vcl

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

              Introduction

              In this intermittent series, I’ll be looking at the most common error messages your C++ compiler (and linker) can produce, explaining exactly what they mean, and showing how they can be fixed (or, better still avoided). The article will specifically talk about the errors produced by the GCC command line compiler, but I’ll occasionally provide some coverage of Microsoft C++ as well. The articles are aimed at beginner to intermediate C++ programmers, and will mostly not be OS-specific.

              Error Messages 101

              Compiler error messages from the GCC g++ compiler generally look like something this:

              main.cpp: In function 'int main()':
              main.cpp:4:12: error: 'bar' was not declared in this scope

              which was produced by this code:

              int main() {
                  int foo = bar;
              }

              The first line of the error says which function the following error(s) is in. The error message itself comes in four main parts; the file the error occurs in, the line number and character offset at which the compiler thinks the error occurs, the fact that it is an error, and not a warning, and the text of the message.

              As well as error, the compiler can also produce warnings. These are usually about constructs that, while not being actually illegal in C++, are considered dubious, or constructs that the compiler has extensions to cover. In almost all cases, you don’t want to use such constructs, and you should treat warnings as errors; in other words, your code should always compile with zero warnings. You should also increase the level of warnings from the compiler’s default, which is usually too low. With g++, you should use at least the -Wall and -Wextra compiler options to do this:

              g++ -Wall -Wextra myfile.cpp

              No such file or directory

              The error I’m looking at today most commonly occurs when you are including a header file using the preprocessor #include directive. For example, suppose you have the following code in a file called myfile.cpp:

              #include "myheader.h"

              and you get the following error message:

              myfile.cpp:1:22: fatal error: myheader.h: No such file or directory
              compilation terminated.

              What could be causing it? Well, the basic cause is that the compiler cannot find a file called myheader.h in the directories it searches when processing the #include directive. This could be so for a number of reasons.

              The simplest reason is that you want the compiler to look for myheader.h in the same directory as the myfile.cpp source file, but it can’t find it. this may be because you simply haven’t created the header file yet, but the more common reason is that you either misspelled the header file name in the #include directive, or that you made a mistake in naming  the header file when you created it with your editor. Look very closely at the names in both the C++ source and in your source code directory listing. You may be tempted to think «I know that file is there!», but if the compiler says it isn’t there, then it isn’t, no matter how sure you are that it is.

              This problem is somewhat greater on Unix-like system, such as Linux, as there file names are character case sensitive, so Myheader.h, MyHeader.h, myheader.h and so on would all  name different files, and if you get the case wrong, the compiler will not look for something «similar». For this reason, a very good rule of thumb is:

              Never use mixed case when naming C++ source and header files. Use only alphanumeric characters and the underscore when naming C+++ files. Never include spaces or other special characters in file names.

              Apart from avoiding file not found errors, this will also make life much easier if you are porting your code to other operating systems which may or may not respect character case.

              The wrong directory?

              Another situation where you may get this error message is if you have split your header files up from your C++ source files into separate directories. This is generally good practice, but can cause problems. Suppose your C++ project is rooted at C:/myprojects/aproject, and that in the aproject directory you have two sub-directorys called src (for the .cpp files) and inc (for the header files), and you put myfile.cpp  in the src directory, and myheader.h in the inc directory, so that you have this setup:

              myprojects
                aproject
                  inc
                    myheader.h
                  src
                    myfile.cpp

              Now if you compile the source myfile.cpp from the src directory, you will get the «No such file or directory» error message. The C++ compiler knows nothing about the directory structures of your project, and won’t look in the inc directory for the header. You need to tell it to look there somehow.

              One thing some people try when faced with this problem is to re-write myfile.cpp so it looks like this:

              #include "c:/myprojects/aproject/inc/myheader.h"

              or the slightly more sophisticated:

              #include "../inc/myheader.h"

              Both of these are a bad idea, as they tie your C++ code to the project’s directory structure and/or location, both of which you will probably want to change at some point in the future. If the directory structure does change, you will have to edit all your #include directories.The better way to deal with this problem is to tell the compiler directly where to look for header files. You can do that with the compiler’s -I option, which tells the compiler to look in the specified directory, as well as the ones it normally searches:

              g++ -Ic:/myprojects/aproject/inc myfile.cpp

              Now the original #include directive:

              #include "myheader.h"

              will work, and if your directory structure changes you need only modify the compiler command line. Of course, writing such command lines is error prone, and you should put such stuff in a makefile, the use of which is unfortunately outside the scope of this article.

              Problems with libraries

              Somewhat similar issues to those described above can occur when you want to use a third-party library.  Suppose you want to use the excellent random number generating facilities of the Boost library. If you are copying example code, you may well end up with something like this in your C++ source file:

              #include "boost/random.hpp"

              This will in all probability lead to yet another «No such file or directory» message, as once again the compiler does not know where «boost/random.hpp» is supposed to be. In fact, it is one of the subdirectories of the Boost installation, and on my system I can get the #include directive to work using this command line:

              g++ -Ic:/prog/boost1461 myfile.cpp

              where /prog/boost1461 is the root directory for my specific Boost library installation.

              Can’t find C++ Standard Library files?

              One last problem that beginners run into is the inability of the compiler to find header files that are part of the C++ Standard Library. One particular favourite is this one:

              #include <iostream.h>

              where you are learning C++ from a very, very old book. Modern C++ implementations have not contained a file called iostream.h for a very long time indeed, and your compiler is never going to find it. You need to use the correct, standard names for such headers (and to get a better book!):

              #include <iostream>

              If this still fails, then there is almost certainly something very wrong with your GCC installation. The GCC compiler looks for Standard Library files in a subdirectory of its installation, and locates that directory relative to the directory containing the compiler executable, so if the Standard Library headers are available, the compiler should always find them.

              Conclusion

              This article looked at the «No such file or directory»  message of the GCC C++ compiler.  If you get this message you should:

              • Remember that the compiler is always right in situations like this.
              • Look very closely at the file name to make sure it is correct.
              • Avoid naming file using mixed-case or special characters.
              • Use the -I compiler option to tell the compiler where to look for files.
              • Make sure that GCC is correctly installed on your system.

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

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

            • Fatal error unit1 pas 7 circular unit reference to unit1 pas
            • Fatal error unhandled exception r2 online
            • Fatal error unhandled exception occurred see log for details сталкер call of chernobyl
            • Fatal error unhandled exception occurred see log for details сталкер anomaly
            • Fatal error unhandled exception in the user interface application

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

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