www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/05/28/15:30:04

From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: problems with make exe
Date: Tue, 28 May 2002 20:17:02 +0100
Lines: 88
Message-ID: <3CF3D7AE.9E255532@phekda.freeserve.co.uk>
References: <acvakt$2mi$1 AT newsread1 DOT arcor-online DOT net>
NNTP-Posting-Host: modem-113.arkansas.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: newsg2.svr.pol.co.uk 1022613693 29105 62.137.55.113 (28 May 2002 19:21:33 GMT)
NNTP-Posting-Date: 28 May 2002 19:21:33 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586)
X-Accept-Language: de,fr
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello.

Stefan Sohst wrote:
> 
> Hi friends,
> I downloaded djgpp and installed everything like written in readme.1st.
> To check, everything is working, I compiled a very simple
> sample-porgramm which works well in an Author-Version of visual C++. So
> I suppose that my problems are rather an installation Problem, than one
> of the Program.

This problem should be posted in comp.os.msdos.djgpp rather than gnu.gcc. I've
directed my reply there.
 
> My installationadress under win98 is:
> C:\DJGPP
> My workspace I use is:
> C:\eigene Dateien\c++\GNU\
> 
> With rhide 1.4.9 I open a file cover.cpp
> The compilation works out allright.
> As soon as the exe-file shall be produces I get the follwing Error:
> 
> Error: c:/djgpp/lib/gcc-lib/djgpp/3.1/libstdcxx.a(c++locale.o): In
> function 'void std::__convert_to_v<float>(char const*, float&,
> std::_IOS_Iostate&, int* const&, int)':
> Error: collect2: 1d returned 1 exit status

This error message looks too short. Did it really display nothing between
'Error: c:/djgpp...' and 'Error: collect2...'?
 
> Can you give me a hint what could be wrong?

Which version of gcc & g++ are you using? This should display it:

    g++ --version

Your C++ program looks fine to me. I'm not sure if "using namespace std;"
works with g++ < 3, though.

> For your information I put the cpp-code to the end of this document.
> 
> Many Thanks
> Liebe Grüße
> 
> Stefan Sohst
> Sohst-Marketing
> Rehrstieg 91
> 21147 Hamburg
> Telefon: 040 24183463
> Fax      : 040 24183 462
> 
> The code:
> //
> // Programm konvertiert Temperaturen in Grad Celsius
> // to nach Grad Fahrenheit
> // Fahrenheit = Celsius  * (212 - 32)/100 + 32
> #include <iostream>
> using namespace std;
> 
> int main(int nNumberofArgs, char* pszArgs[])
> {
>     // Eingabe der Temperatur in Grad Celsius
>     int nCelsius;
>     cout << "Temperatur in Grad Celsius:";
>     cin >> nCelsius;
> 
>     // berechne Umrechnungsfaktor von Celsius
>     // nach Fahrenheit
>     int nFactor;
>     nFactor = 212 - 32;
> 
>     // verwende Umrechnungsfaktor zur Konvertierung
>     // von Celsius in Fahrenheit
>     int nFahrenheit;
>     nFahrenheit = nFactor * nCelsius/100 + 32;
> 
>     // Ausgabe des Ergebnisses
>     cout << "Fahrenheit Wert ist:";
>     cout << nFahrenheit;
> 
>     return 0;
> }

Regards,

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

- Raw text -


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