delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/30/16:32:37

From: arthurs AT gpu11 DOT gpu DOT nec DOT com DOT tw (Arthur Sung)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: C++ won't work!
Date: Wed, 30 Oct 96 15:23:20 GMT
Organization: SEEDNET InterNetNews News System
Lines: 22
Message-ID: <556e65$98q@voyager.iii.org.tw>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 961029083536 DOT 18709H-100000 AT is>
NNTP-Posting-Host: 192.72.141.144
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I have problems on compiling C++ programs with GCC,
and this is what I have tried.

******** Compiling Result *********
L:\ap5\arthur\DJGPP\ARTHUR_C>gcc test.cpp -lalleg
test.cc(.text+0x48): undefined reference to `cout'
test.cc(.text+0x4d): undefined reference to `ostream::operator<<(char const*)'
test.cc(.text+0x61): undefined reference to `cout'
test.cc(.text+0x66): undefined reference to `ostream::operator<<(char const*)'
test.cc(.text+0x71): undefined reference to `ostream::operator<<(char const*)'

******** MY Source Code "test.cpp"*********
#include <stdio.h>
#include <iostream.h>

#include <allegro.h>

void main(){
    printf("THIS IS A TEST !!!!\n");
    cout << "this is a test \n";
    cout << allegro_id << " \n";
}

- Raw text -


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