Dev-C++ cannot find <iostream> or <iostream.h> header files - c++

Dev-C++ cannot find the I/O stream header files. I tried it with both #include <iostream> and #include <iostream.h> but I get the following errors.
[Error] iostream.h: No such file or directory
[Error] iostream: No such file or directory
What can I check in the Dev-C++ settings to make sure it's properly configured to build programs that use the C++ Standard Library?

#include <iostream>
You've got a double 's' in your code as far as I can see and that may be causing a problem. If including "iostream" header file won't work as well it means that your Dev-C++ (sic!) is probably not linked with MinGW properly.
As the others said, consider using f.e. Code::Blocks instead Dev-C++.

If you didn't download the Dev C++ that includes MinGW then you don't have the standard libraries. If you do have the standard libraries you will need to make sure to set it up by pointing it to the location of the source on your system.
If you still need the standard libraries, you can go to "Downloads" section of this page and go to the first link which includes MinGW.
But your best bet is to send Dev C++ off to die in a fire. The incredibly powerful Visual Studio 2015 is out and the Community version is free: https://www.visualstudio.com/downloads/download-visual-studio-vs There's really no excuse for using anything else on Windows.

Related

#include <Eigen/Dense> failed, #include "Eigen/Dense" succeeds - why?

While setting up the Eigen library, I tried:
#include <eigen/Eigen/Dense>
Which results in the error:
eigen/Eigen/Dense: No such file or directory
However,
#include "eigen/Eigen/Dense"
succeeds.
Why is this? Based on previous questions asked, I suspect this is because #include <> searches in the system directory and #include "" searches locally. If this is true, how would one put the Eigen folder in the system directory?
You will need to follow the instructions that are specific for your operating system. You did not describe your operating system and compiler, and this is something for which no standard instructions apply for every operating system used in the world today. It varies by operating system and compiler.
Alternatively, all C++ compilers have a configuration setting that adds an additional directory to the list the compiler looks when searching for #include <path> header files. gcc, and many other Linux compilers use the -I option. This can be specified manually, or in a Makefile.
MS-Windows compilers have a specific settings too. This Stackoverflow question provides instructions for several versions of the Visual Studio IDE.

error: iostream.h due to including cplex

I am trying to use cplex in eclipse in Ubuntu 12.04 but when I include ilocplex.h I get the following error
/opt/ibm/ILOG/CPLEX_Studio124/concert/include/ilconcert/ilosys.h:360:22: fatal error: iostream.h: No such file or directory
The only two includes are written as follows:
#include <ilcplex/ilocplex.h>
#include <iostream>
I would appreciate if anyone could help me with this.
At the time ILOG's Concert library was first released, the older iostream.h headers were still common in C++ compilers, but it supports the standard iostream libraries. To use the standard headers and libraries, you need to define the IL_STD preprocessor symbol. Instructions for defining preprocessor directives in Eclipse/C++ can be found in this question.
Try reading the manual again or look again at the samples. Cplex has supported both the old style iostream.h and the newer C++ iostream standard for at least a decade. I just don't have the manual with me right now to give the full reference.

TR1 is "missing" - which header or library am I missing from my project configuration?

I'm attempting to use some types from TR1/functional. I have the following reference in my header file:
#include <tr1/functional>
This is resulting in an error:
C1083: Cannot open include file: 'tr1/functional': No such file or
directory.
This has always worked before. I've been browsing MSDN trying to determine if I'm missing a library reference or something of the sort, but for the life of me I'm unable to find out what is wrong with my project configuration.
I'm using C++11 and working in Visual Studio 2013 Developer Preview.
The <tr1/*> headers should have been deprecated or removed following their inclusion in the standard. So they're mostly there for older compilers such as VS2010 or VS2008. Including <functional> alone should fix it.
A couple things to note though, although I do not know if it applies to VS2013 is that std::regex's include is <regex> yet still resides in the old std::tr1 namespace.
I am also using VS 2013 and faced same problem. After few research, finaly I got it working using Boost. It is prety well supported.

not able to include few header files in dev c++

When i include few header files like #include "afxwin.h" and #include "afxext.h" in Dev C++, its showing me file not found. Can anyone help me?
I was having the same problem and this worked for me
In filename.cpp, I put: #include "full path to filename.h"
When using the file, I had put: #include "full path to filename.h" and #include "full path to filename.cpp"
These are MS Visual C++ precompiled headers (related to MFC):
http://en.wikipedia.org/wiki/Precompiled_header
You might get lucky and be able to compile and use them in combination with GCC/Dev-C++, but I wouldn't bet on it (see the third comment on the opening post):
How do I move from the MSVC compiler to GCC on Windows?
Assuming that comment is correct, you won't be able to use MFC on GCC compilers. And because Dev-C++ uses these, you won't be able to use MFC in combination with Dev-C++ either. As an alternative, you could try out a free version of MS Visual Studio to be able to use the headers.

How can I use the old iostream.h in C++ (Visual Studio 2010)

I have a Microsoft Visual C++ 6.0 Project and converted it successfully with MS VS Professional 2010 Trial. No conversion problems occured. However, when building the converted project it tells me, that "iostream.h" cannot be found.
I am aware of the new and standardized "iostream" and the "using namespace std" fix.
But I need to use the old iostream.h. Is there a way to accomplish that? The reason is, that this project relies on an old static lib using the old iostream.h.
Any suggestions?
If you have source code relying on iostream.h, change it.
If you have source code that you absolutely cannot change, write iostream.h yourself:
#include <iostream>
using namespace std;
A static library cannot possibly rely on a header file. A header file is included by source code or other header files, the static library consists of object code. The library's header files can depend on iostream.h, though.
The library itself can depend on the C++ standard library.
I assume that there have been incompatible changes to Microsoft's standard library since MSVC 6.0, so if you do not have source code or a newer version of your static library, then you are probably out of luck.
Are you using precompiled headers? If so, then you'll have to include iostream.h within the stdafx.hfile or remove the precompiled headers. Anyway, there seems no reason using the deprecated iostream.h instead of iostream, so maybe you should change the parts of the code that need the old version (if so).
Replace
#include <iostream.h>
with
using namespace std;
#include <iostream>