Informix 6.0 ESQL C++ problem??? 
Author Message
 Informix 6.0 ESQL C++ problem???

Hi,
   We're having a problem converting our C++ ESQL code from
Informix 5.0 to Informix 6.0.  For 5.0 we had our own
header file to define the informix functions such as "iqdbase()"
as extern "c".  Now in 6.0 informix defines them in their
ESQL header file so we had to take them out of ours.  Now
we have a link problem with these functions as it looks like
the linker is looking for the C++ functions like "iqdbase_FPci()".
We are using SunOS 5.3.

Any ideas,
jim



Wed, 05 Mar 1997 01:07:41 GMT
 Informix 6.0 ESQL C++ problem???


Quote:

>Hi,
>   We're having a problem converting our C++ ESQL code from
>Informix 5.0 to Informix 6.0.  For 5.0 we had our own
>header file to define the informix functions such as "iqdbase()"
>as extern "c".  Now in 6.0 informix defines them in their
>ESQL header file so we had to take them out of ours.  Now
>we have a link problem with these functions as it looks like
>the linker is looking for the C++ functions like "iqdbase_FPci()".
>We are using SunOS 5.3.

>Any ideas,
>jim


Since C++ is going to mangle the names of external symbols, for
namespace support, you must modify the Informix Headers to use
the extern "C" syntax.  For example:

#if defined( c_plus_plus )
   extern 'C' {
#endif

   stuff .....
         .....

#if defined( c_plus_plus )
   }
#endif

Note that the symbol c_plus_plus is my recollection with out checking
what the C++ compiler defines.  This puts each function into the global
namespace, preventing the mangling of the function names by the compiler.

Enjoy,
  -Greg



Fri, 07 Mar 1997 10:14:42 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Informix 6.0 esql/c problem

2. Informix esql/c w/ sun C++

3. Informix ESQL/C use C++ under SCO OpenServer

4. Using Informix's C++ API and ESQL/C

5. Informix ESQL/C and C++ questions.

6. Informix esql/c w/ sun C++

7. Informix ESQL/C with C++

8. Problem of ESQL/C in Online 6.0 under HP-UX9.X

9. Fw: Compile and Debug esql/c with Visual C++ 5.0 Or Borland C++ Builder 4.0

10. Problems compiling 32 bit code with ESQL/C, Online V6, Visual C++

11. Problem using c++ with esql

12. DB2 - ESQL visual c++ problem


 
Powered by phpBB® Forum Software