c++ - can't compile with iostream.h
- Cleatis (14/14) Apr 21 2005 I am trying to compile a simple hello-world program and I can't seem to ...
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
Apr 21 2005
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 tocompilecorrectly. I only have the downloaded version, but here is the error Iget: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
Apr 21 2005
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 tocompilecorrectly. I only have the downloaded version, but here is the error Iget: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
Apr 21 2005
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 anerrorthough. 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...errorlevel1Try: 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 tocompilecorrectly. I only have the downloaded version, but here is the error Iget:Use C++ compiler for iostream.h - invoke with -cpp switch ---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
Apr 22 2005