I downloaded 'visual studio code' on a Macbook air (M2) and after running the program in C ++, visual studio gives an error 'iostream' file not found, 'iomanip' file not found. I think he does not see the standard libraries (it is not exactly known). Can you help please ? (By the way, in Xcode everything works fine).
[1]: https://i.stack.imgur.com/3xgAr.png
[2]: https://i.stack.imgur.com/KpCDO.png
Related
Hi i followed this video to set-up VS2017 for sfml using.
Youtube Video
I did what he says but when i debug project i get this error:
Error MSB6006 "CL.exe" exited with code -1073741515.
I find out on google that this is some sort of compiler error but not how to fix this. Can someone help me or point me to answer?
I'm using Visual Studio 2017 and i downloaded SFML: Visual C++ 14 (2015) - 32-bit
Indeed, you compiler crashed. The status code -1073741515 translates to 0xC0000135 which in turn translates to STATUS_DLL_NOT_FOUND. That is bad. That is not about the SFML dlls, but a library Visual Studio itself uses. Something is very wrong with your Visual Studio installation.
Chances are you will get the same error without using SFML.
I don't know what the tutorial did and I'm not going to watch a video to find out. Your best chance is to do a clean reinstall of your Visual Studio installation and then follow the official guide from the SFML homepage. That works.
I tried to use Eigen library within the Arduino IDE fist. Then I got the error:
fatal error: eigenfolder/Eigen/Dense: No such file or directory
Then I tried to use EigenArduino library. Then I got an error
fatal error cstddef No such file or directory #include cstddef
So I realized that there is probably a lot of standard library that is not linked/implemented into this Arduino IDE. So before getting everythin I decided to move into ATMEL STUDIO 7. My hope was that Atmel Studio gets everything automatically.
But in order to use my previous Arduino Sketches, I also installed Visual Micro that is a Plug-In for Atmel Studio so that you can use everything like in the Arduino IDE.
==> So the problem starts all over again. Same errors in Atmel Studio 7. It seems like I am just using the Atmel Studio 7 Editor now, but the same compiler settings, libraries etc. (Since I am a newbie :-) this is just a guess ).
How can I link all this together? Can somebody please help?
How did you add the library ?
Did you use libraries manager in Arduino IDE ?
Or you downloaded the library separately ?
I found out that using libraries manager solve most compatibility issues.
I am trying to get the correct error code out of errno when opening a directory as a file, both with fopen as well as with ifstream.open(). I expect EISDIR, I get EACCES.
I am compiling (and executing) with the MSVC 12.0 toolchain on Windows 7 x64.
I have been reading in article (https://gehrcke.de/2011/06/reading-files-in-c-using-ifstream-dealing-correctly-with-badbit-failbit-eofbit-and-perror/) where the author got the output "stream failbit (or badbit). error state: Is a directory".
I compiled the authors files with GCC 4.6 (or above, not sure atm) and on passing a directory as argument I get EACCES as well.
I know there is no easy way of telling whether a disk object is a directory on windows, so not getting EISDIR is not too surprising.
Is there anything that can be done about it (getting EISDIR on windows, that is)?
Are there other errno's that behave in a similar (unexpected) way?
Microsoft's C runtime libraries define, but do not use the EISDIR symbol. So you won't get that error code from them. To get the answer to your other question, you need to look in the C library source code. It ships with Visual Studio and, in case of Visual Studio 2015 and later, Windows SDK.
In Visual Studio 2015 (14.0), which uses the Universal CRT, the file you want is called errno.cpp and it's included in the Windows SDK, I have it in c:\Program Files (x86)\Windows Kits\10\Source\10.0.10586.0\ucrt\misc\errno.cpp.
In Visual Studio 2013 (12.0), the file you want is called dosmap.c and it's included in the VC subdirectory of the Visual Studio installation directory, I have it in C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\crt\src\dosmap.c.
Both of those files contain an error table mapping OS error codes to C library error codes. You can use it to confirm whether a particular mapping conforms to your expectations.
The fopen function isn't a part of the Windows API; it comes from the run-time support library from some given C or C++ development environment.
This EISDIR error works in a C application built for Cygwin and shipped with Cygnal:
c:\users\kaz>txr
This is the TXR Lisp interactive listener of TXR 148.
Use the :quit command or type Ctrl-D on empty line to exit.
1> (open-file ".")
#<file-stream . 6fffff00738>
2> (get-string *1)
** error reading #<file-stream . 6fffff00738>: 21/"Is a directory"
** during evaluation at expr-2:1 of form (get-string *1)
3>
The open-file function in this language uses fopen, and get-string ultimately relies on C stdio.h functions. The fopen succeeds, but the subsequent input attempt receives the EISDIR error. (Mapped to the same traditional 21 code as on Linux and other platforms). That is turned into an exception. The "Is a directory" string is from strerror.
You just need a more richly featured C run-time library with better POSIX support than the paltry offering provided with Microsoft Visual Studio.
So, in Visual Studio 2013 I created a program in which I use OpenCV.
But when I want to compile the program, there is an error that the MSVCP100D.dll is missing. I compile it in Debug version and I don't want to compile the program in Release version, so I need this file.
I tried to install the Microsoft Visual C++ 2010 Redistributable Package, but it is already on my computer.
Should I download the single file (MSVCP100D.dll) and paste it in C:\windows\system32\? Because there I can find the MSVCP100.dll file, but not the MSVCP100D.dll file.
I also read related questions about this problem, but it didn't help.
Edit: And now the MSVCP110D.dll is missing too. Same error, but now the MSVCP110D.dll file.
You have some code compiled in Visual Studio 2010. Recompile the code in Visual Studio 2013 to get rid of the MSVCP100D.dll dependency (replace it with MSVCP120D.dll that is).
Solution (Worked for me): In your Visual Studio project properties, under Linker>General>Additional Library Directories, use $(OPENCV_DIR)\x64\vc12\lib (For your system this may change depending on whether you use x86 or x64 version). Then your program should run. At least it worked for me :)
Explanation: I had the same problem with same version of OpenCV and VS. After a lot of research I found out that the problem might be incompatibility of OpenCV's pre-built binaries with Visual Studio 2013.
#Sheng Jiang's answer helped me. I used dependency walker and found that opencv_core2410d.dll depended on MSVCP100D.dll because opencv libraries that I was using were complied using Visual Studio 2010 (placed in vc10 folder) and MSVCP100D.dll is associated with Visual Studio 2010.
One option was to recompile the OpenCV code with Visual Studio 2013 (as suggested by Sheng Jiang's answer above). But this was unnecessary since OpenCV 2.4.10 already provides pre-built libraries built using Visual Studio 2013. These pre-built libraries are in the C:\opencv\build\x64\vc12 folder (exact path might differ for your machine).
Here comes the importance of vc10, vc11 and vc12 libraries. You choose the folder corresponding to the version of Visual Studio you are using. My mistake was to choose vc10 instead of vc12.
I have tried to install and configure opencv and link it with visual studio 2010 in 32bit windows 7 but after all the configuration when i debug a piece of code i get this error really need help please help.
"error LNK1181: cannot open file 'opencv_calib3d243d.lib'"
"'opencv_calib3d243d.lib'" was included during the configuration, but still i get this error.
I have followed the coniguration procedure from here.
Installing OpenCV 2.4.3 in Visual C++ 2010 Express
There might be 2 things that are the source of your woes:
You are trying to link to x64 instead of x86 (this is assuming that your OS is 32-bit, of course)
You haven't specified the Linker Directory properly.
I would advise you to use CMake to link your libraries as it will make your life a lot simpler.. Please refer to my answer to this question for details..