www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/24/07:17:10

From: fabian AT cs DOT uct DOT ac DOT za (Fabian Nunez)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: bugs with c++ compiler
Date: 24 Jul 1998 11:08:14 GMT
Organization: University of Cape Town
Lines: 58
Message-ID: <6p9puu$58a$1@groa.uct.ac.za>
References: <35AD21F6 DOT 3EF6 AT iee DOT efei DOT br>
NNTP-Posting-Host: toro.cs.uct.ac.za
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In <35AD21F6 DOT 3EF6 AT iee DOT efei DOT br> Fernando Manoel Cambraia Guedes <fernando AT gerson DOT iee DOT efei DOT br> writes:

>I've got some trouble while trying to compile c++ code. In fact, I made
>a simple program to test the compiler:

>#include <iostream.h>
>main()
>{
>   cout << "testando";
>}

>I use RHIDE for developping with djgpp. At the first try, LFN was set to
>'n', and I've got the following error (the comand line was called by
>RHIDE):

>command -> gcc -g -c teste.cpp -o teste.o

>error   -> e:/djgpp/lang/cxx/iostream.h(31) Error: streambuf.h: No such
>file or directory (ENOENT)

>When I changed LFN to 'y', the long filename problem went out, but this
>new problem appeared at the link phase:

>command -> gcc -o teste.exe teste.o -lstdcx

>error   -> e:/djgpp/bin/ld.exe: cannot open -lstdcx: No such file or
>directory (ENOENT)

Your problem is that the guy who built gcc 2.8.x used a long filename
system (probably a win95 shell window) and so everything uses long
filenames (hence your problem with finding the .h file).  He also gave
the standard C++ library its "proper" name, which is libstdcxx.a (9
chars before the dot!).  So your solution is to code under windows
(with lfn=y) and change RHIDE's setup so it links -lstdcxx (instead of
-lstdcx).  There are alternatives if you want to code in a short
filename environment, but they are quite messy (involving a filename
substitution file - a new feature of 2.8.0 AFAIK).  My advice is to
code in a long filename environment (we're in 1998 not 1978!) and to
change RHIDE's linker options.

>I tried to solve the problem by the FAQ, but the best I did was this. If
>you could help-me, I'd be very grateful.

[SNIP lots of config info]

>Thank you for the attention.

>Fernando Manoel Cambraia Guedes		fernando AT iee DOT efei DOT br

>Itajuba', Minas Gerais, Brazil.

Hope that helps
Fabian
--
Fabian Nunez, B.Sc(Hons)      Collaborative Visual Computing Laboratory,
fabian AT cs DOT uct DOT ac DOT za           University of Cape Town

"Ram Disk" is NOT an installation procedure!

- Raw text -


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