Mail Archives: djgpp/1997/02/07/11:35:44
You should use gxx to compile c++ programs. What's going wrong
is that the proper libraries are not being linked to your program.
gxx, I think, just adds -x g++ -liostr -lgpp to the gcc command
line.
You could also use Rhide, which automatically links the standard
libraries for c++ based on the extension of your source file.
Deez Nutz (mceeras AT akula DOT com) spake thus:
: I am starting on learning C++ using DJGPP and I am having problems. I
: have downloaded the lgp and gpp files for C++ and I have had previous
: success in running simple programs like "Hello World!" In C
: previously. However, In reading a book entitled "C++ Programming 101"
: by Sams Publishing, I have not been succesful in do such simple
: programs in c++:
: This is the following C++ syntax that I type:
: // Filename hello.cpp Displays Message
: #include<iostream.h>
: void main()
: {
: cout << "Hello World!";
: }
: I then compile as so:
: C:\>gcc hello.cpp -o hello
: I then get an error regarding the main function. I cant recall what
: exactly the error is but If someone can help I would appreciate it.
: Thank You.
--
#include <disclaimer.h> #include <humorous_quote.h>
void main(geek *code) { code->name=Danny Rathjens; code->version=3.1;
GCS/M/S d+(-) s+:- a-- C+++>$ ULSC++>+++$ P+? L+ E W++(+) N+++ o K w++
!O !M- V- PS PE+ Y-- PGP- t++@ !5 X+ R+ tv b+++ DI+ D+ G++ e+ h r y?; }
- Raw text -