delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/31/03:00:31

Xref: news2.mv.net comp.os.msdos.djgpp:6593
From: j DOT hendriks AT student DOT utwente DOT nl (Jasper Hendriks)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Problem with undefined references in DJGPP v2.0
Date: 29 Jul 1996 10:29:32 GMT
Organization: Jaz Electronics
Lines: 29
Message-ID: <4ti3qc$t5t@dinkel.civ.utwente.nl>
References: <4tfrbc$5e7 AT dinkel DOT civ DOT utwente DOT nl>
NNTP-Posting-Host: wit393115.student.utwente.nl
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <4tfrbc$5e7 AT dinkel DOT civ DOT utwente DOT nl>, j DOT hendriks AT student DOT utwente DOT nl 
says...
>
>Hi!
>
>Im experiencing a problem when i compile (gcc test.cc) the following 
>program:
>
>#include <stdio.h>
>void main()
>{
>  cout << "hello world!";
>}
>
>I get the following message:
>test.cc(.text+0x37): undefined reference to `cout'
>test.cc(.text+0x3c): undefined reference to `ostream::operator<<(char const 
>*)'
>
>If i use printf, everything compiles and runs fine.
>
>It would be great if someone could help me out on this...
>

Ok i just found out myself, when i use gxx test.cc extra libraries are scanned 
so i dont have to add them with gcc -lxxxlib.a.

Cya!

- Raw text -


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