www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/07/14/11:05:19

Xref: news-dnh.mv.net comp.os.msdos.djgpp:912
Path: news-dnh.mv.net!mv!news.sprintlink.net!howland.reston.ans.net!dish.news.pipex.net!pipex!news.mathworks.com!news.kei.com!babbage.ece.uc.edu!ankh.iia.org!news
From: avly AT detour1 DOT nerc DOT com (AV Ly)
Newsgroups: comp.os.msdos.djgpp
Subject: I can't seem to link a "hello world" program in DJGPP v2
Date: Thu, 13 Jul 1995 02:55:08 GMT
Organization: International Internet Association
Lines: 63
Nntp-Posting-Host: 205.147.138.2
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

Hi all.

I just ftp'd DJGPP 2 from the turnbull site, and I have a problem
linking (and/or compiling) a hello world program in c++.
The source code is:
 
#include <iostream.h>

int main()
{
  cout << "Hello world!" << endl;

  return 0;
}

and I have tried compiling it as,

e:\temp>gcc hello.cpp -liostr
e:\temp>gcc hello.cpp -lgpp

I have also tried linking in the other libraries as well,
but I always get this error message:

outfloat.c(.text+0x161): undefined reference to `_IO_dtoa'

It sure looks like a missing piece of code in the library or
something, so I downloaded the source but I couldn't find the
file outfloat.c.

Does anyone know what is really causing this error?

By the way, I got my djgpp.env file from the same site.
Also, the environment variables related to DJGPP that
I have set are:

DJGPP=c:/prg/djgpp/djgpp.env
EMU387=c:/prg/djgpp/bin/emu387.dxe
387=n

(the last two lines are there because my pc doesn't have a math
coprocessor)

One more thing, I tried to compile a relatively small C++ program (274
lines) that I compiles and runs well under Unix, and DJGPP always
complained that there isn't any more virtual memory left, and
sometimes hung up after displaying that message. I experimented and it
seems that it gives that error message under DOS+QEMM DPMI, but not in
a DOS shell under Windows 3.11 (QEMM still present). Does this mean
that it isn't compatible somehow with my QEMM configuration? And of
course, even though it doesn't give that virtual memory error in the
DOS shell under Windows, I still end-up with that linker error I
described before.

Thanks in advance for any help, and many thanks to all the people
behind DJGPP, too!

--
AV 





- Raw text -


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