From: Richard Dawe 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: NNTP-Posting-Host: modem-113.arkansas.dialup.pol.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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(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 > 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/ ]