Linkage Script for a 32-Bit Application on 32-Bit Red Hat Linux - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

Product
Preprocessor2 for Embedded SQL
Release Number
15.00
Language
English (United States)
Last Update
2018-09-27
dita:id
B035-2446
lifecycle
previous
Product Category
Teradata Tools and Utilities

Linkage Script for a 32-Bit Application on 32-Bit Red Hat Linux

cc <sourcefile.c> -o <executablename> -lppruntim -ltdusr -lcliv2 -lnsl 

Note: Red Hat Linux 3.0

A compilation error occurs if:

  • an attempt is made to compile a PP2 application on Red Hat Linux 3.0
  • PPCMain has been built on Red Hat Linux 7.3
  • To fix the compilation error:

    1 Add this code to the .pc file:

    ===================================================================== 
    #include <ctype.h> __const unsigned short int *__ctype_b;
    __const __int32_t *__ctype_tolower; 
    __const __int32_t *__ctype_toupper; 
    void ctSetup() 
    { 
    __ctype_b = *(__ctype_b_loc()); 
    } 
    =====================================================================

    2 Call ctSetup from main() as first statement.