www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/24/10:52:26

Message-Id: <199812241552.PAA15466@remus>
From: "Arthur" <arfa AT clara DOT net>
To: <djgpp AT delorie DOT com>
Subject: RE: Help with djgpp error / newbie
Date: Thu, 24 Dec 1998 15:50:58 -0000
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
In-Reply-To: <3682290D.3F338C45@tav.mitsui.co.jp>
Reply-To: djgpp AT delorie DOT com

> Please please p;lease give me a hand:
>
> I have just installed the DJGPP compiler (for C++) which I downloaded
> from delorie.com.
>
> I have written a very basic program and compiled succesfully (to my
> amazement). (The source is below...)
> Now I want to run (exec) and I get an error message indicating that
> ld.exe has no input files.
>
> When I run ld.exe I get the following line ("d:/djgpp/bin/ld.exe: no
> input files."

I'm not sure why you'd want to run ld.exe to run a program. If it's compiled
and linked properly, it should create an exe file for you.

If your file is called test.cpp, go to the directory where the file is
stored in the DOS prompt, and type:

gxx test.cpp -o test.exe

That should compile and link your file.

> Can anybody please tell me what is the problem, why it matters and how
> can I overcome it and run my program?
>
> It is very important as it is my first exercise for university.... :)
>
> thanks a million!
>
> P.S. Does anybody know if I can print from this RHIDE editor?

The latest beta of RHIDE has a printing function.

> Ady Mor
>
> Source:
> /* Program receives height, width and length and prints out volume of
> chest */
>
> #include <iostream.h>
> void main ()
> {
> cout<<"Enter height width and length (do not use commas)"<<endl;
> double  height, width, length;
> cin>>height>>width>>length;
> double   volume=height*width*length;
> cout<<"volume of chest is:"<<volume<<endl;
> }

Shouldn't it be int main(), and shouldn't it return a value at the end of
the function?

James Arthur - jaa AT arfa DOT clara DOT net
http://www.jado.org/users/arfa/
ICQ#15054819


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019