Mail Archives: djgpp/1997/12/11/19:32:18
Tron wrote:
>
> djgpp is a c++ compiler isnt??? how can i compile c file name.cpp with
> gcc...
>
> like we do with c files
> example: gcc -Wall -c name.c bla...bla...bla...
I assume that after this command, you use something like:
gcc -o name.exe name.o
Otherwise, that '-c' parameter isn't going to do what you expect.
In any case, there are two things you must to in order to build C++
programs with DJGPP. You must install the C++ compiler and libraries
(v2gnu/gpp2721b.zip and v2gnu/lgp271b.zip), and you must link the C++
libraries when you compile.
In one step:
gcc -Wall -o name.exe name.cpp -lgpp
In two steps:
gcc -Wall -c name.cpp
gcc -o name.exe name.o -lgpp
You can also substitute 'gxx' for 'gcc', which adds '-lgpp' to the
command line automatically.
This is all in the documentation, btw, which I suggest you read.
hth
--
---------------------------------------------------------------------
| John M. Aldrich | "Money is truthful. If a man speaks |
| aka Fighteer I | of his honor, make him pay cash." |
| mailto:fighteer AT cs DOT com | |
| http://www.cs.com/fighteer | - Lazarus Long |
---------------------------------------------------------------------
- Raw text -