cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/2003/05/16/18:00:16

From: anthony AT prairienet DOT org (Anthony)
Newsgroups: comp.os.msdos.djgpp
Subject: Trouble Compiling C++ with DJGPP
Date: 16 May 2003 14:46:46 -0700
Organization: http://groups.google.com/
Lines: 82
Message-ID: <e3d7c716.0305161346.61886eff@posting.google.com>
NNTP-Posting-Host: 130.126.25.99
X-Trace: posting.google.com 1053121607 7691 127.0.0.1 (16 May 2003 21:46:47 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: 16 May 2003 21:46:47 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I once had an early version of DJGPP version 3.x.x working properly on
an old Win95 machine and have recently come into a Win98 machine. I'm not
sure if it is the second edition or not and I have no way to reinstall
so I'd rather not do anything to temp fate. ;-)

I have downloaded the following files from the site delorie.com and placed
them all into the base directory c:\djgpp where I used unzip32 to unzip
everything from within the same directory.

v2/copying.dj       DJGPP Copyright info                3 kb
v2/djdev203.zip     DJGPP Basic Development Kit       1.5 mb
v2/faq230b.zip      Frequently Asked Questions        664 kb
v2/readme.1st       Installation instructions          22 kb

v2gnu/bnu213b.zip   Basic assembler, linker           2.5 mb
v2gnu/gcc323b.zip   Basic GCC compiler                2.7 mb
v2gnu/gdb53b.zip    GNU debugger                      1.5 mb
v2gnu/gpp323b.zip   C++ compiler                      2.7 mb
v2gnu/mak3791b.zip  Make (processes makefiles)        267 kb
v2gnu/txi42b.zip    Info file viewer                  725 kb

Sources
v2/djlsr203.zip     DJGPP Library/Utils Sources       1.5 mb
v2/djtst203.zip     DJGPP C Library Self-Test Files   851 kb
v2/faq230s.zip      Frequently Asked Questions        292 kb

The C compiler works flawlessly as far as I can tell but as I picked up
some information on learning C++ recently I have discovered that I am
completely unable to compile any C++ programs. I wrote the following
small test and here is the error message.

--Snippet--
#include <iostream>

int main()
{
    cout << "Hello world.\n";
    return(0);
}
-----------

--Error--
hello.cc: In function 'int main()':
hello.cc:5: 'cout' undeclared (first use this function)
hello.cc:5: (each identifier reported only once)
---------

I decided to check the file iostream for myself and to my great personal
surprise it was not there. None of the files that are standard for C++
were there in fact. In fact there isn't even a libg++.a libc++.a libstdcx.a
or libstdcxx.a in the c:\djgpp\lib subdirectory. I did some looking and
found that (seemingly) all of the files had been placed in the subdirectory
c:\djgpp\lang\cxx\3.23 with additional subdirectories 3.23\backward 3.23\bits
3.23\djgpp and 3.23\ext respectively. Still no apparent library for C++
though. With some more searching I found the following files.

c:\djgpp\lib\gcc-lib\djgpp\3.23\libgcc.a
c:\djgpp\lib\gcc-lib\djgpp\3.23\libstdcxx.a
c:\djgpp\lib\gcc-lib\djgpp\3.23\libsupcxx.a

Strangely there was no readme in this directory. I have not overwritten or
renamed anything and I have not changed anything at all yet. I have however
created a batch file which sets the following environment variables whenever
I want to use the compiler.

--djgpp.bat--
set path=c:\djgpp\bin;%path%
set djgpp=c:\djgpp\djgpp.env
-------------

Should I move the files from djgpp\lib\gcc-lib\djgpp\3.23 and from djgpp\lang\
cxx\3.23 all to my djgpp\lib and djgpp\include directories respectively?
Is there a new process for installing everything? Should I add something
extra to my path? I've combed the entire FAQ on both DJGPP and on CXX and
I am having no luck at all. I have installed extra libraries of Allegro 4.0.3
and of PD-Curses and of GRX, but these do not change directory structure to
my knowledge and they have their own respective directories with makefiles
and appropriate files were copied automatically to the include and lib
directories without me having to do it by hand. Can anyone help me please?
Thanks.

~Anthony (anthony AT prairienet DOT org)

- Raw text -


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