Rejected by Custodian

LE_MAILBOX le_mailbox at qmgate.anl.gov
Mon Dec 18 07:00:00 EST 1995


Mail*Link(r) SMTP               RE>CC-Compilor instead of cc

> Hello!
> 
> I want to write a routine for a hydrological model that makes use of
functions from the GIS-library in GRASS. However, the hydrological model needs
the "CC" compilor whereas grass uses the "cc" compilor.
> 
> Can someone inform me if it is OK to compile grass-code with the newer "CC"
 compilor or not. Can I select "CC" as the default compilor for gmake4.1?
> 
> Thank you in advance!

        Hi there,

        you don't give a lot of details, but CC as opposed to cc is a common
        name for C++ compilers. You can not use a C++ compiler to
        compile GRASS (ANSI C is a near subset of C++, but GRASS is mostly
        K&R, which is incompatibly for the style of function declarations 
        alone...)

        However, most C++ compilers have no problems with linking libraries
        written in C, as long as they see the correct function prototypes
        adorned with 'extern "C"'.

        Have a look at the file grass-defs.h on grass/incoming (*),
        this provides prototypes suitable for inclusion in C++ programs.
        Use

        extern "C" {
        #include "grass-defs.h"
        }

        Let me know if this works for you.

        Martin

        (*)That's on the moon, but seeing that you post from Norway,
           ftp://ftp.informatik.uni-kiel.de/pub/packages/grass/incoming
           might be faster.

------------------ RFC822 Header Follows ------------------
Received: by qmgate_backup.anl.gov with SMTP;18 Dec 1995 12:13:24 -0600
Received: (from daemon at localhost) by diego.cecer.army.mil (8.7/8.7) id
JAA10230 for grassp-people; Mon, 18 Dec 1995 09:22:17 -0600 (CST)
Received: from max.cecer.army.mil (max.cecer.army.mil [129.229.20.254]) by
diego.cecer.army.mil (8.7/8.7) with SMTP id JAA10227 for
<grassp-list at diego.cecer.army.mil>; Mon, 18 Dec 1995 09:22:16 -0600 (CST)
Received: from ixgate02.dfnrelay.d400.de (ixgate02.dfnrelay.d400.de
[193.174.248.2]) by max.cecer.army.mil (8.6.9/8.6.9) with ESMTP id JAA28586
for <grassp-list at max.cecer.army.mil>; Mon, 18 Dec 1995 09:01:10 -0600
X400-Received: by mta d400relay in /PRMD=dfnrelay/ADMD=d400/C=de/; Relayed;
               Mon, 18 Dec 1995 16:20:48 +0100
X400-Received: by /PRMD=uni-kiel/ADMD=d400/C=de/; Relayed;
               Mon, 18 Dec 1995 16:22:06 +0100
X400-Received: by /PRMD=uni-kiel/ADMD=d400/C=de/; Relayed;
               Mon, 18 Dec 1995 16:20:04 +0100
Date: Mon, 18 Dec 1995 16:20:04 +0100
X400-Originator: ma at informatik.uni-kiel.d400.de
X400-Recipients: non-disclosure:;
X400-MTS-Identifier: [/PRMD=uni-kiel/ADMD=d400/C=de/;gutemine
026414.0819300004000]
X400-Content-Type: P2-1984 (2)
Alternate-Recipient: Allowed
From: Martin Ameskamp <ma at informatik.uni-kiel.d400.de>
Message-ID: <9512181519.AA26407 at gutemine.informatik.uni-kiel.d400.de>
Sender: grass-lists-owner at moon.cecer.army.mil
Reply-To: grassp-list at moon.cecer.army.mil
Precedence: Bulk
Sender: grass-lists-owner at moon.cecer.army.mil.
Reply-To: grassp-list at moon.cecer.army.mil.
Precedence: Bulk
To: grassp-list at max.cecer.army.mil
Subject: Re: CC-Compilor instead of cc
Received: from rigel (rigel.informatik.uni-kiel.de) 
          by gutemine.informatik.uni-kiel.de (4.1/SMI-4.1-MHS-7.0) id AA26407;
          Mon, 18 Dec 95 16:19:41 +0100
Received: by rigel (1.38.193.4/16.2) id AA23162; Mon, 18 Dec 1995 16:20:19
+0100
In-Reply-To: from "grass-lists-owner at max.cecer.army.mil" at Dec 18, 95 3:38 pm
Mailer: Elm [revision: 70.85]








More information about the grass-dev mailing list