SGI openGL, g++

SGI openGL, g++

Post by Eric Neufel » Thu, 17 Oct 1996 04:00:00



Will g++ programs link with the openGL library on SGI workstations?

Eric

 
 
 

SGI openGL, g++

Post by Walter Robers » Thu, 17 Oct 1996 04:00:00



Quote:>Will g++ programs link with the openGL library on SGI workstations?

No. g++ uses a different name mangling scheme.
--

"NFS is the worst possible form of file sharing government (right after
all the others.)"

 
 
 

SGI openGL, g++

Post by Michael Pichle » Fri, 18 Oct 1996 04:00:00



> Will g++ programs link with the openGL library on SGI workstations?

With OpenGL no problem (as its a C libary),
but Inventor is not g++-compatible (you need SGI's CC).

Michael

 
 
 

SGI openGL, g++

Post by Robert A Schmi » Fri, 18 Oct 1996 04:00:00




>>Will g++ programs link with the openGL library on SGI workstations?
>No. g++ uses a different name mangling scheme.

What does name mangling have to do with OpenGL? It's a C library
and I use g++ all the time with it. Maybe your thinking of OpenInventor?

--
Bob
------------------------------------------------------------------------
Robert A. Schmitt                               RESolution Graphics Inc.

 
 
 

SGI openGL, g++

Post by Muljadi Sulisti » Sun, 20 Oct 1996 04:00:00




> >Will g++ programs link with the openGL library on SGI workstations?

> No. g++ uses a different name mangling scheme.

Hmm.. we have been able to link our OpenGL, and GL program with g++
for sometime now without any problem.  OpenGL is just a C library...

--
Mul                      Software Engineer, Computer Aided Design
Software, Inc.

PGP Fingerprint:         2F 4E 49 85 2B 61 2B E2  6F CE 61 E3 2F 09 30 80
PGP Public Key Available Upon Request.
Disclaimer:  Views represented here do not neccessarily represent
CADSi's views.

 
 
 

SGI openGL, g++

Post by Helge Hes » Mon, 21 Oct 1996 04:00:00




> > Will g++ programs link with the openGL library on SGI workstations?

> With OpenGL no problem (as its a C libary),
> but Inventor is not g++-compatible (you need SGI's CC).

I'm somewhat confused about this SGI vs GNU compiler
stuff. What is the problem with gcc linking against
SGI-C-libs ? Some people say, it's possible to link
libs (like OpenGL-lib) with gcc, other's say it's not.
What's the difference between linking a lib like OpenGL
and a lib like Inventor ?

Bye
  Helge

 
 
 

SGI openGL, g++

Post by Dave Shreine » Mon, 21 Oct 1996 04:00:00


Hi,

   There's no problem linking to a C library with gcc.  The problem
arises when trying to link a C++ library ( like SGI's OpenInventor )
using g++.  

   Just for completeness, when a C++ compiler compiles a program, it
changes names like LinkedList::insert to things like
__ct_7LinkedList_insert.  Its called "name mangling".  The issue
here is that g++ and SGI's c++ compiler mangle names differently,
and as such, when you link, the routines aren't found.

Thanx,
Dave

  ---------------------------------------------------------------------


   Silicon Graphics, Inc.                            (301) 572-3290

 
 
 

SGI openGL, g++

Post by Frederick Haa » Tue, 22 Oct 1996 04:00:00





> > > Will g++ programs link with the openGL library on SGI workstations?

> > With OpenGL no problem (as its a C libary),
> > but Inventor is not g++-compatible (you need SGI's CC).
> I'm somewhat confused about this SGI vs GNU compiler
> stuff. What is the problem with gcc linking against
> SGI-C-libs ? Some people say, it's possible to link
> libs (like OpenGL-lib) with gcc, other's say it's not.
> What's the difference between linking a lib like OpenGL
> and a lib like Inventor ?

As Michael pointed out, OpenGL is a C library.  Inventor
is a C++ library.  Apparently the C library stuff works
ok with any standard C compiler, but you need SGI's C++
compiler (CC) to use SGI's C++ libraries, something to
do with naming.

Personally I have not tried g++ on an SGI in several years, I
did get it to work with IrisGL at that time, but since then
I've been lucky enough to have someone paying for the
SGI CC (c++) compiler for me.  It saves a lot of headaches, if
only because I can call SGI and complain about their products,
and hopefully get some help.

--
-=-=- Frederick Haab -=- Software Developer -=- Turner Production -=-=-

 
 
 

SGI openGL, g++

Post by Jon Lee » Wed, 23 Oct 1996 04:00:00



Quote:>   Just for completeness, when a C++ compiler compiles a program, it
>changes names like LinkedList::insert to things like
>__ct_7LinkedList_insert.  Its called "name mangling".     The issue
>here is that g++ and SGI's c++ compiler mangle names differently,
>and as such, when you link, the routines aren't found.

    If you really want to be complete, note that name mangling is only a
small aspect of the incompatibility. Object allocation and layout, calling
conventions, and many other internal implementation choices are usually made
differently in different C++ compilers, or even in different releases of the
same compiler.
    Jon