openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] "Half" support in C?


From: Bob Friesenhahn
Subject: Re: [Openexr-devel] "Half" support in C?
Date: Wed, 2 Mar 2005 14:39:14 -0600 (CST)

On Wed, 2 Mar 2005, Drew Hess wrote:

Bob Friesenhahn <address@hidden> writes:

On Wed, 2 Mar 2005, Derek Gerstmann wrote:

Currently, we've been using the Half class from OpenEXR and compiling
our C code as C++, which has limited the adoption of Half support
to simple standalone modules that are linked dynamically.

Unfortunately, there are people who have a good C compiler but no
C++. This is not uncommon for people who depend on vendor (e.g. IBM
AIX) compilers which are expensive.

Do you have an example of such a platform where gcc is either not
available, or isn't ABI-compliant such that code compiled with it
can't interoperate with the commercial compiler?

GCC supports most platforms. The code it generates may not be as efficient as some vendor compilers.

The typical situation is that it is easy for GCC code to link with OS/vendor libraries (the normal case). It is problematic for vendor compilers to link with libraries build with GCC (even C libraries) because code built with GCC expects certain support functions (e.g. _eprintf) to exist. Adding libgcc to the mix may cause other problems (e.g. duplicate symbols).

Due to C++ initialization and symbol dependency issues, it may be very difficult for code from a vendor compiler to link properly with GCC created C++ libraries. It will help to link the C code using g++.

The upshot is that depending on GNU C++ to satisfy the requirement is not satisfactory unless GNU C/C++ is used for the whole build. Even then, introducing a C++ component into an otherwise C application requires that the C application be linked using the C++ compiler.

Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]