954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Digital Mars - unable to open input file 'iostream'

I'm using "Digital Mars" to compile the following program:

#include <iostream>
using namespace std;

int main() {
cout <<"My name is Abder-Rahman";
return 0;
}


And, this is what I get:

C:\Users\Software Engineer\Desktop\C++\dm852c\dm\bin>dmc print1
Fatal error: unable to open input file 'iostream'
--- errorlevel 1


Any ideas on that?

Thanks.

SWEngineer
Light Poster
39 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

The code is fine. Your compiler installation is probably broken. You have a bad include path, permissions problems, or you have files missing.

VernonDozier
Posting Expert
5,527 posts since Jan 2008
Reputation Points: 2,633
Solved Threads: 711
 

SWEngineer,
This is a syntax problem with Digital Mars.
I am currently using Bloodshed's IDE and compiler Dev-C++, and your code ran fine (with a few substitutions)
I would recommend switching to a different compiler, but if you would rather use Digital Mars, refer to its documentation.
Dev-C++ is an IDE with a compiler, so its much easier to use, and has many features.

To use STL code in Digital Mars you have to download the library's first ftp://ftp.digitalmars.com/Digital_Mars_C++/STL/stlport.zip
After that you have to switch -I\dm\stlport\stlport so that the compiler can find

Let me know if you need anymore help.

P.S. The Readme.html in Digital Mars will give you all this information.

kernel>panic
Light Poster
45 posts since Mar 2009
Reputation Points: 13
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: