OpenInventor & G++

OpenInventor & G++

Post by Vignoli Fabi » Thu, 06 Jun 1996 04:00:00



Dear Fellows,

I have some problems using gnu g++ ver 2.7.2
and SGI OpenInventor 2.0.
I have a lot of warning like:

compiling with g++ -c -ansi hello.c++

/usr/include/Inventor/nodes/SoCamera.h:51:
        static member function `SoCamera::getFieldDataPtr()' cannot have
`const' method qualifier
/usr/include/Inventor/nodes/SoCamera.h:
        In function `static const class SoFieldData **
SoCamera::getFieldDataPtr()':
/usr/include/Inventor/nodes/SoCamera.h:51:
        warning: return to `const SoFieldData **' from `SoFieldData **'
        adds cv-quals without intervening `const'
/usr/include/Inventor/nodes/SoPerspectiveCamera.h: At top level:
        In file included from hello.c++:6:
/usr/include/Inventor/nodes/SoPerspectiveCamera.h:74:
        warning: `class SoPerspectiveCamera' only defines a private
destructor and has no friends
In file included from /usr_kit/include/Inventor/nodes/SoSeparator.h:31,
                 from hello.c++:7:
/usr/include/Inventor/nodes/SoGroup.h:122:
        warning: `class SoGroup' only defines a private destructor and
has no friends
        In file included from hello.c++:7:
/usr/include/Inventor/nodes/SoSeparator.h:34: `extern' can only be
specified for objects and functions
/usr/include/Inventor/nodes/SoSeparator.h:35: `extern' can only be
specified for objects and functions
/usr/include/Inventor/nodes/SoSeparator.h:128:How to solve or get around
this problem?
        warning: `class SoSeparator' only defines a private destructor
and has no friends
/usr/include/Inventor/sensors/SoDataSensor.h:34: `extern' can only be
specified for objects and function

And then I cannot compile because:

hello.c++: In function `int main(int, char **)':
hello.c++:14: cannot allocate an object of type `SoSeparator'
hello.c++:14:   since the following virtual functions are abstract:
hello.c++:14:   class SoType SoBase::getTypeId() const
hello.c++:16: cannot allocate an object of type `SoMaterial'
hello.c++:16:   since the following virtual functions are abstract:
hello.c++:16:   class SoType SoBase::getTypeId() const
*** Error code 1 (bu21)

Is there any flags that I can set ,just to use g++ as SGI CC?
Can Anyone sove this problem?

Thanks in advance

Fabio Vignoli

 
 
 

OpenInventor & G++

Post by Martin Knoblau » Thu, 06 Jun 1996 04:00:00



|> Dear Fellows,
|>
|> I have some problems using gnu g++ ver 2.7.2
|> and SGI OpenInventor 2.0.
|> I have a lot of warning like:
|>

 [ stuff deleted ]
|>
|> Is there any flags that I can set ,just to use g++ as SGI CC?
|> Can Anyone sove this problem?
|>
Fabio,

 even if g++ would compile without problems, you could not link
your program, as g++ and SGI-CC use different schemes to do the
name mangling. You would need to have g++ compiled versions of
the inventor libraries. Sorry.

Martin
--
+---------------------------------+-----------------------------------+
|Martin Knoblauch                 | Silicon Graphics GmbH             |
|Manager Application Center       | Am Hochacker 3 - Technopark       |
|Silicon Graphics Computer Systems| D-85630 Grasbrunn-Neukeferloh, FRG|
|                                 | Phone: (+int) 89 46108-179 or -0  |
|                                 | Fax:   (+int) 89 46108-190 (-222) |
+---------------------------------+-----------------------------------+

+---------------------------------------------------------------------+

 
 
 

1. OpenInventor & Gnu g++

Dear fellows,

I have some problems using gnu g++ ver 2.7.2
and SGI OpenInventor 2.0.
I have a lot of warning like:

compiling with g++ -c -ansi hello.c++

/usr/include/Inventor/nodes/SoCamera.h:51:
        static member function `SoCamera::getFieldDataPtr()' cannot have
`const' method qualifier
/usr/include/Inventor/nodes/SoCamera.h:
        In function `static const class SoFieldData **
SoCamera::getFieldDataPtr()':
/usr/include/Inventor/nodes/SoCamera.h:51:
        warning: return to `const SoFieldData **' from `SoFieldData **'
        adds cv-quals without intervening `const'
/usr/include/Inventor/nodes/SoPerspectiveCamera.h: At top level:
        In file included from hello.c++:6:
/usr/include/Inventor/nodes/SoPerspectiveCamera.h:74:
        warning: `class SoPerspectiveCamera' only defines a private
destructor and has no friends
In file included from /usr_kit/include/Inventor/nodes/SoSeparator.h:31,
                 from hello.c++:7:
/usr/include/Inventor/nodes/SoGroup.h:122:
        warning: `class SoGroup' only defines a private destructor and
has no friends
        In file included from hello.c++:7:
/usr/include/Inventor/nodes/SoSeparator.h:34: `extern' can only be
specified for objects and functions
/usr/include/Inventor/nodes/SoSeparator.h:35: `extern' can only be
specified for objects and functions
/usr/include/Inventor/nodes/SoSeparator.h:128:How to solve or get around
this problem?
        warning: `class SoSeparator' only defines a private destructor
and has no friends
/usr/include/Inventor/sensors/SoDataSensor.h:34: `extern' can only be
specified for objects and function

And then I cannot compile because:

hello.c++: In function `int main(int, char **)':
hello.c++:14: cannot allocate an object of type `SoSeparator'
hello.c++:14:   since the following virtual functions are abstract:
hello.c++:14:   class SoType SoBase::getTypeId() const
hello.c++:16: cannot allocate an object of type `SoMaterial'
hello.c++:16:   since the following virtual functions are abstract:
hello.c++:16:   class SoType SoBase::getTypeId() const
*** Error code 1 (bu21)

Is there any flags that I can set ,just to use g++ as SGI CC?
Can Anyone sove this problem?

Thanks in advance

Fabio Vignoli

2. Artwork from the uk

3. Gnu G++ and OpenInventor on SGI

4. Education Video

5. How to Compile OpenInventor programs using g++

6. need qrt scripts

7. Using G++ with OpenInventor ?

8. IRIS Explorer & OpenInventor 2.1.1

9. OpenInventor & Contours

10. Clipping & OpenInventor

11. openinventor & linux

12. OpenInventor&Magellan(SpaceMouse)