delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/17/17:57:42

From: Andrew Crabtree <andrewc AT typhoon DOT rose DOT hp DOT com>
Message-Id: <199704172129.AA112022544@typhoon.rose.hp.com>
Subject: Re: How do I use DJGPP? missing cc1plus.exe
To: anarchy AT stad DOT dsl DOT nl
Date: Thu, 17 Apr 1997 14:29:03 PDT
Cc: djgpp AT delorie DOT com
In-Reply-To: <3354eca5.1354695@news.globalxs.nl>; from "Peter Jan Piet Kleyn" at Apr 17, 97 12:41 (noon)

> I've just installed a version of DJGPP, but when I trie to compile
> some source, like the one below I get a message that cc1plus.exe is
> missing and that the installation was incomplete. Can anybody help me
> or sent me this file???

You probably just installed the basic C compiler support.  If you want to
compile c++ files you will also need to get the DJGPP C++ package
(available from the same place you got the other parts, read the FAQ
or readme for details about the names). 

To get this program to compile as c do this.

1) Make sure the extension is .c, not cc or cpp

2) Some code changes are needed

> 
> #include <stdio.h>
> 
> main()
int main(void)
{
> { printf("Input 2 digits: ");
>   int a, b, som, verschil, u, v;
/* in c we declare stuff at the beginning of blocks */
int a, b, som, verschil, u, v;
/* io is buffered so use \n, or fflush */
printf("Input 2 digits: \n");

>   scanf("%d %d", &a, &b); 
>   som = a + b, verschil = a - b
>       u = som * som , v = verschil * verschil;
>   printf("\nDe uitkomten zijn %d en %d.\n", u, v);
> }

- Raw text -


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