Thread overview |
---|
April 22, 2005 can't compile with iostream.h | ||||
---|---|---|---|---|
| ||||
I am trying to compile a simple hello-world program and I can't seem to compile correctly. I only have the downloaded version, but here is the error I get: Use C++ compiler for iostream.h - invoke with -cpp switch --- errorlevel1 My program is as follows: #include <iostream.h> void main() { cout << "hello world"; } I saved my file in C:\dm\bin as helloworld.c And I am compiling from the C:\dm\bin folder by typing dmc helloworld. Please help, Thanks, James |
April 22, 2005 Re: can't compile with iostream.h | ||||
---|---|---|---|---|
| ||||
Posted in reply to Cleatis | Try: dmc helloworld -cpp "Cleatis" <Cleatis_member@pathlink.com> wrote in message news:d49mpa$1a1n$1@digitaldaemon.com... > I am trying to compile a simple hello-world program and I can't seem to compile > correctly. I only have the downloaded version, but here is the error I get: > > Use C++ compiler for iostream.h - invoke with -cpp switch --- errorlevel1 > > My program is as follows: > #include <iostream.h> > > void main() > { > cout << "hello world"; > } > > I saved my file in C:\dm\bin as helloworld.c > And I am compiling from the C:\dm\bin folder by typing dmc helloworld. > > Please help, > Thanks, > James > > |
April 22, 2005 Re: can't compile with iostream.h | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | I tried that and it creates a file called helloworld.obj. I still get an error though. It says: OPTLINK : Error 118:Filename Expected LIB = "C:\Documents and Settings\MyFolder\dm\bin\..\lib"; LIB = "C:\Documents and Settings\MyFolder\dm\bin\..\mfc\lib"; --- Error Level 1 Any ideas???? Thanks again, James In article <d49ro5$1ecb$1@digitaldaemon.com>, Walter says... > >Try: > dmc helloworld -cpp > >"Cleatis" <Cleatis_member@pathlink.com> wrote in message news:d49mpa$1a1n$1@digitaldaemon.com... >> I am trying to compile a simple hello-world program and I can't seem to >compile >> correctly. I only have the downloaded version, but here is the error I >get: >> >> Use C++ compiler for iostream.h - invoke with -cpp switch --- errorlevel1 >> >> My program is as follows: >> #include <iostream.h> >> >> void main() >> { >> cout << "hello world"; >> } >> >> I saved my file in C:\dm\bin as helloworld.c >> And I am compiling from the C:\dm\bin folder by typing dmc helloworld. >> >> Please help, >> Thanks, >> James >> >> > > |
April 22, 2005 Re: can't compile with iostream.h | ||||
---|---|---|---|---|
| ||||
Posted in reply to Cleatis | The problem is you've installed it into a directory with spaces in it (which causes problems with the linker). Try installing it in a directory without spaces. "Cleatis" <Cleatis_member@pathlink.com> wrote in message news:d4a1qb$1kor$1@digitaldaemon.com... > I tried that and it creates a file called helloworld.obj. I still get an error > though. It says: > OPTLINK : Error 118:Filename Expected > LIB = "C:\Documents and Settings\MyFolder\dm\bin\..\lib"; > LIB = "C:\Documents and Settings\MyFolder\dm\bin\..\mfc\lib"; > > --- Error Level 1 > > Any ideas???? > > Thanks again, > James > > > In article <d49ro5$1ecb$1@digitaldaemon.com>, Walter says... > > > > >Try: > > dmc helloworld -cpp > > > >"Cleatis" <Cleatis_member@pathlink.com> wrote in message news:d49mpa$1a1n$1@digitaldaemon.com... > >> I am trying to compile a simple hello-world program and I can't seem to > >compile > >> correctly. I only have the downloaded version, but here is the error I > >get: > >> > >> Use C++ compiler for iostream.h - invoke with -cpp switch --- errorlevel1 > >> > >> My program is as follows: > >> #include <iostream.h> > >> > >> void main() > >> { > >> cout << "hello world"; > >> } > >> > >> I saved my file in C:\dm\bin as helloworld.c > >> And I am compiling from the C:\dm\bin folder by typing dmc helloworld. > >> > >> Please help, > >> Thanks, > >> James > >> > >> > > > > > > |
Copyright © 1999-2021 by the D Language Foundation