Proc*c precompile issues

My apoligies in advance if I'm in the wrong forum.
I'm experiencing precompiler issues that seem related to the configuration of my pcscfg.cfg file but I may be all wet here...
I'm trying to precompile some downloaded example programs from OTN using proc from 11.2.0.1 install on x86_64 linux.
using gmake stage1
Pro*C/C++: Release 11.2.0.1.0 - Production on Sun Jun 10 11:55:05 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
System default option values taken from: /opt/oracle/product/11.2.0/dbhome1/precomp/admin/pcscfg.cfg
Syntax error at line 201, column 37, file /usr/include/bits/sched.h:
Error at line 201, column 37 in file /usr/include/bits/sched.h
extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
....................................1
PCC-S-02201, Encountered the symbol "__setsize" when expecting one of the follow
ing:
Syntax error at line 203, column 44, file /usr/include/bits/sched.h:
Error at line 203, column 44 in file /usr/include/bits/sched.h
extern cpu_set_t *__sched_cpualloc (size_t __count) __THROW __wur;
...........................................1
PCC-S-02201, Encountered the symbol "__count" when expecting one of the followin
g:
The symbol "," was substituted for "__count" to continue.
Syntax error at line 199, column 15, file /usr/include/time.h:
Error at line 199, column 15 in file /usr/include/time.h
extern size_t strftime (char *__restrict __s, size_t __maxsize,
..............1
PCC-S-02201, Encountered the symbol "strftime" when expecting one of the followi
ng:
; , = ( [
The symbol ";" was substituted for "strftime" to continue.
Syntax error at line 199, column 47, file /usr/include/time.h:
Error at line 199, column 47 in file /usr/include/time.h
extern size_t strftime (char *__restrict __s, size_t __maxsize,
..............................................1
PCC-S-02201, Encountered the symbol "size_t" when expecting one of the following
... auto, char, const, double, enum, float, int, long,
ulong_varchar, OCIBFileLocator OCIBlobLocator,
OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
short, signed, sql_context, sql_cursor, static, struct,
union, unsigned, utext, uvarchar, varchar, void, volatile,
a typedef name, exec oracle, exec oracle begin, exec,
exec sql, exec sql begin, exec sql type, exec sql var,
The symbol "enum," was substituted for "size_t" to continue.
Syntax error at line 43, column 9, file /usr/include/xlocale.h:
Error at line 43, column 9 in file /usr/include/xlocale.h
typedef __locale_t locale_t;
........1
PCC-S-02201, Encountered the symbol "__locale_t" when expecting one of the follo
wing:
auto, char, const, double, enum, float, int, long,
ulong_varchar, OCIBFileLocator OCIBlobLocator,
OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
short, signed, sql_context, sql_cursor, static, struct,
union, unsigned, utext, uvarchar, varchar, void, volatile,
a typedef name,
The symbol "enum," was substituted for "__locale_t" to continue.
Syntax error at line 217, column 15, file /usr/include/time.h:
Error at line 217, column 15 in file /usr/include/time.h
extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
..............1
PCC-S-02201, Encountered the symbol "strftime_l" when expecting one of the follo
wing:
; , = ( [
The symbol ";" was substituted for "strftime_l" to continue.
Syntax error at line 217, column 49, file /usr/include/time.h:
Error at line 217, column 49 in file /usr/include/time.h
extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
................................................1
PCC-S-02201, Encountered the symbol "size_t" when expecting one of the following
... auto, char, const, double, enum, float, int, long,
ulong_varchar, OCIBFileLocator OCIBlobLocator,
OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
short, signed, sql_context, sql_cursor, static, struct,
union, unsigned, utext, uvarchar, varchar, void, volatile,
a typedef name, exec oracle, exec oracle begin, exec,
exec sql, exec sql begin, exec sql type, exec sql var,
The symbol "enum," was substituted for "size_t" to continue.
Syntax error at line 220, column 6, file /usr/include/time.h:
Error at line 220, column 6 in file /usr/include/time.h
__locale_t __loc) __THROW;
.....1
PCC-S-02201, Encountered the symbol "__locale_t" when expecting one of the follo
wing:
... auto, char, const, double, enum, float, int, long,
ulong_varchar, OCIBFileLocator OCIBlobLocator,
OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
short, signed, sql_context, sql_cursor, static, struct,
union, unsigned, utext, uvarchar, varchar, void, volatile,
a typedef name, exec oracle, exec oracle begin, exec,
exec sql, exec sql begin, exec sql type, exec sql var,
The symbol "enum," was substituted for "__locale_t" to continue.
Syntax error at line 91, column 5, file /usr/include/bits/pthreadtypes.h:
Error at line 91, column 5 in file /usr/include/bits/pthreadtypes.h
__pthread_list_t __list;
....1
PCC-S-02201, Encountered the symbol "__pthread_list_t" when expecting one of the
following:
} char, const, double, enum, float, int, long, ulong_varchar,
OCIBFileLocator OCIBlobLocator, OCIClobLocator, OCIDateTime,
OCIExtProcContext, OCIInterval, OCIRowid, OCIDate, OCINumber,
OCIRaw, OCIString, short, signed, sql_context, sql_cursor,
struct, union, unsigned, utext, uvarchar, varchar, void,
volatile, a typedef name,
The symbol "enum," was substituted for "__pthread_list_t" to continue.
Syntax error at line 225, column 38, file /usr/include/pthread.h:
Error at line 225, column 38 in file /usr/include/pthread.h
extern int pthread_create (pthread_t *__restrict __newthread,
.....................................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:
Syntax error at line 226, column 30, file /usr/include/pthread.h:
Error at line 226, column 30 in file /usr/include/pthread.h
__const pthread_attr_t *__restrict __attr,
.............................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:
Error at line 0, column 0 in file stage1.pc
PCC-F-02102, Fatal error while doing C preprocessing
gmake: *** [stage1.c] Error 1
pcscfg.cfg file
[oracle@oralnx6 admin]$ cat pcscfg.cfg
sys_include=(/usr/include,/usr/include/linux,/usr/lib/x86_64-redhat-linux5E/include)
ltype=short
define=__x86_64__
uname -a
Linux oralnx6.localdomain 2.6.32-300.21.1.el6uek.x86_64 #1 SMP Wed Apr 18 19:15:19 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

my pcscfg.cfg file is fine when I use proc directly, but make or gmake is failing me.
proc iname=sample1
Pro*C/C++: Release 11.2.0.1.0 - Production on Fri Jun 15 14:46:29 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
System default option values taken from: /opt/oracle/product/11.2.0/dbhome1/precomp/admin/pcscfg.cfg
OR
proc iname=stage1
Pro*C/C++: Release 11.2.0.1.0 - Production on Fri Jun 15 14:48:21 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
System default option values taken from: /opt/oracle/product/11.2.0/dbhome1/precomp/admin/pcscfg.cfg
However, the compiler can't find the header files. So that seems to be yet another issue.
invoking the compiler directly worked fine...
gcc -o sample2 sample2.c -m64 -I $ORACLE_HOME/precomp/public -L $ORACLE_HOME/lib -lclntsh -lsql11
so it was a simple matter of correcting the makefile
Edited by: OrakleDBA on Jun 19, 2012 7:23 PM

Similar Messages

  • Proc/c++ precompiler - where it is

    Which Oracle Software package from the download page includes proc/c++ precompiler.
    I'm looking into :
    http://otn.oracle.com/software/content.html
    Thanks, Srdjan

    If it is bundled with something, it will be the database.

  • JSP Precompilation Issue:

    I'm trying to precompile my JSPs so that the .class files can be included along with the WAR.
    For this pre-compilation , i'm using the jspc ANT task.
    I have the following issues:
    1) A number of JSPs have HTML pages included in them.
         Say my JSPs are in a folder : jsp
         and HTMLs in a folder :html
         The JSPs include the HTML with this TAG :
              <%@ include file="//html/myHtml.html" %>
         When i try to run the jspc task for the first time, I get an exception indicating that //html/myHtml.html has not been found.
         I do not make any changes, but run the ant task again, The JSPs are convered to Java files.
         I'm not able to figure out what happens the first time i run the ant task
    2) Once i run the jspc task, i run the javac task to compile the JSP converted JAVA files.
    Since a lot my JSPs have other JSPs included in them, i get several compilation errors caused by the included JSPs
    Should the JSPs be compiled in the order that they are included in the JSPs?
    3) I'm using Tomcat 4.1. to host the web appln. What are the modifications i need to make to use pre-compiled JSPs in the WAR file?

    Simply change the file extent on the JSPs that are only included. The extent ".jspf" (JSP fragment) is a reasonable convention.

  • Jspc precompile issue

    Hi all,
    I'm having an issue with jspc, but a bit of background first;
    I've been asked to port an application from WebSphere 6.0 to GlassFish 2.1.1. The application uses ibm's implementation of jsf and includes their html extension tags. Now the only way i could get it to work correctly (without lots of rewriting) was to include the ibm jsf-impl jsf-api and jsf-ibm jars (together with a few others) in the web-inf/lib of the war, i then configured glassfish to use these libs before it's own. All of this worked well and runs great on glassfish, although the first load is slow so i thought i'd precompile.
    Now when i come to try to precompile the JSP files I get stuck.
    jspc runs without any errors but after deployment i get the following error:
    [#|2009-12-01T15:58:02.564+0000|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8080-2;_RequestID=deb66471-c0d8-49d5-8007-b6985b304d59;|StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
    java.lang.NoSuchMethodError: com.sun.faces.taglib.jsf_core.ViewTag.setJspId(Ljava/lang/String;)VThis is because the jspc command has used the glassfish libraries to compile the jsp's and when deployed, it uses the libraries included in the web app to run it (i'm assuming).
    So i thought i could get round this by modifying the jspc.bat file included in the glassfish release to use my classes instead, basically by inputting the paths to my libs before the glassfish libs (i cvhanged the -cp parameter in the bat file)
    But now i get an error when i run the jspc command:
    WC6341: According to the TLD, deferred-value is specified for the attribute styleClass of the tag handler com.sun.faces.taglib.html_basic.FormTag, but the argument for the setter method is not a javax.el.ValueExpression
    I'm assuming this error is generated because the jspc command is using the tld from jsf 1.2 instead of using the jsf 1.1 tld to validate the files but i can't figure out where it's picking up the html_basic.tld from.
    I've tried doing the precompile at deploy time using the admin tool but i get a similar error to the first one:
    C:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-apps\vctmEAR-09004-russia-uat\vctm_war\org\apache\jsp\AdditionalCustomerInfo_jsp.java:194: cannot find symbol
    symbol  : method setJspId(java.lang.String)
    location: class com.sun.faces.taglib.jsf_core.ViewTag
          _jspx_th_f_view_0.setJspId("id85");
                           ^Basically, what i'm asking is, does anyone know how to get a jsf 1.1 app to precompile and deploy onto glassfish but using their own defined taglibs?
    I hope all this is inderstandable, i know i've skimmed over some of the details but i can expand any of the points if required.
    Cheers

    Note: This thread was originally posted in the [Java Compiler|http://forums.sun.com/forum.jspa?forumID=7] forum, but moved to this forum for closer topic alignment.

  • JSP precompile issue - moving to JRE 1.5

    We are in the process of migrating our app which is based on JDK 1.4.2 and runs on JRE 1.4.2. We will now be switchin to JRE 1.5._06 and I am told that we need to precompile all the JSPs -- i'm not sure why this is required shouldnt this be taken care of when the app gets deployed and the page is called .. why do i need to precompile i'm just trying to understand.. any help is appreciated .... RR

    if your app is large you will do it because the j2ee container will also compile those jsp's into servlets.. servlets are run on the container not the jsp's

  • ProC/C++ precompiler

    Hi All,
    I am trying to find if possible by itself the Precompiler (C/C++) for Oracle 8i ? I see that the DB is installed on one of the boxes I am using here, and the DB works fine, but I am unable to locate the precompiler as such.
    If it is unavailable by itself can someone please tell me which package to download ?
    Thanks,
    Nenad

    If it is bundled with something, it will be the database.

  • CLR proc assembly registration issue

    Have a .NET 3.5 Sql Clr SP that uses RabbitMQ nuget package. Apparently RabbitMQ has a dependency on system.servicemodel, version=3.0.0.0 as I get this error when trying to register my custom clr assembly with sql:
    Msg 10301, Level 16, State 1, Line 21
    Assembly 'SqlClrRabbitMq' references assembly 'system.servicemodel, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly
    from the same location where referring assembly came from, but that operation has failed (reason: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request.
    Msg 6528, Level 16, State 1, Procedure PublishMessages, Line 26
    Assembly 'SqlClrRabbitMq' was not found in the SQL catalog of database 'FOTNConfig'.
    system.servicemodel is a GAC assembly so why is SQL complaining?
    scott

    Ricardo, I tried adding a reference to System.ServiceModel.dll and rebuilding, redeploying and re-registering assembly.  When registering my custom assembly, I get this error:
    Msg 10301, Level 16, State 1, Line 22
    Assembly 'SqlClrRabbitMq' references assembly 'system.servicemodel, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly
    from the same location where referring assembly came from, but that operation has failed (reason: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request.
    Msg 6528, Level 16, State 1, Procedure PublishMessages, Line 27
    Assembly 'SqlClrRabbitMq' was not found in the SQL catalog of database 'FOTNConfig'.
    The assembly is targeting .NET 3.5.  SQL Server is 2014.
    I tried manually copying System.ServiceModel.dll to C:\SqlClr and I get a diff error message when registering my custom CLR assembly:
    Warning: The Microsoft .NET Framework assembly 'system.servicemodel, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported.
    In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
    Msg 6586, Level 16, State 1, Line 24
    Assembly 'System.ServiceModel' could not be installed because existing policy would keep it from being used.
    I guess the next question is how do you change the policy?

  • Problems with Precompiler "proc"

    I'am using oracle 8.1.7 proc zu precompile embedded sql. I get the following error message when I try to procompile these sql-statement:
    EXEC SQL SELECT ( CASE WHEN BEGINN_DT > HAFT_BEGINN THEN HAFT_BEGINN ELSE BEGINN_DT END) FROM VABR_VTR_VA_SPA;
    "PCC-S-02201, Fand das Symbol "WHEN" als eines der folgenden erwartet wurde:
    ( ) * + - / . @ | at, day, hour, minute, month, second, year,"
    When I use the same statement e.g. in sqlplus it works.
    Is there something wrong with the proc precompiler ?

    This forum is meant for discussions about OTN content/site and services.
    Questions about Oracle products and technologies will NOT be answered in this forum. Please post your product or technology related questions in the appropriate product or technology forums, which are monitored by Oracle product managers.
    Product forums:
    http://forums.oracle.com/forums/index.jsp?cat=9
    Technology forums:
    http://forums.oracle.com/forums/index.jsp?cat=10

  • Oracle 8iLite, Windows 98 and ProC/C++

    + Does Oracle 8iLite support a ProC/C++ precompiler on Windows 98?
    + If so: Is the CONNECT command (EXEC SQL connect :user at :db using :connect) supported or not?.
    null

    Pro*C is a tool that you get with Oracle install to convert your C programs with SQL statements into a C program so you can compile and link using your C compile available on that system.
    What exactly is the problem you are facing?

  • PRO*C MAKE 화일의 비밀

    제품 : PRECOMPILERS
    작성날짜 : 1995-11-21
    Understanding and Modifying Precompiler and OCI Makefiles
    Note: This bulletin is also posted under the PCC category (#104220.448).
    In order to successfully create a program using the Oracle Precompilers (Pro*C,
    Pro*COBOL, Pro*FORTRAN, Pro*Ada, etc.) you need to precompile, compile, and
    link your program with the Oracle libraries. On Unix systems, the easiest way
    to do this is to use the 'make' utility. Make is a unix command that enables
    you to manipulate files automatically. It works by way of a makefile, which is
    a file written in a language that 'make' can understand. Oracle provides
    makefiles for precompiling, compiling, and linking your programs. They can be
    found under the $ORACLE_HOME subdirectory, in
    $ORACLE_HOME/proc/demo/proc.mk for Pro*C,
    $ORACLE_HOME/procob/demo/procob.mk for Pro*COBOL,
    $ORACLE_HOME/profor/demo/profor.mk for Pro*FORTRAN, and
    $ORACLE_HOME/proada/demo/proada.mk for Pro*Ada.
    All of the makefiles are very similar in terms of the macros that they define,
    and how they are used. The remainder of this bulletin will use Pro*C and
    proc.mk as an example, but the concepts discussed here are also relevant to the
    other languages.
    This bulletin is divided into 6 sections and two appendecies:
    I. How to use proc.mk for version 1.4, 1.5, and 1.6 of Pro*C
    II. How to use proc.mk for version 2.0 of Pro*C
    III. How does proc.mk work?
    IV. Modifying proc.mk to change the precompile and compile options, and to
    add your own libraries
    V. Modifying proc.mk for a program which has more than one source module
    VI. How to link OCI programs using proc.mk or oracle.mk
    VII. Some issues about linking
    Appendix A. Source code for the multiple module example
    Appendix B. List of useful makefile macros
    I. How to use proc.mk for version 1.4, 1.5, and 1.6 of Pro*C
    The makefile for these Pro*C versions is set up to create an executable from a
    program that is in a single source file. To use it, copy proc.mk from
    $ORACLE_HOME/proc/demo into the directory which contains your source code.
    This directory also contains electronic versions of the sample programs found
    in the "Pro*C Supplement to the Oracle Precompilers Guide". Once you have
    copied proc.mk into your directory, you can create your executable by just
    typing 'make -f proc.mk <program name>', where <program name> is
    the file containing your code, without the .pc extension. For example, if your
    code is in my_prog.pc, you would use 'make -f proc.mk my_prog':
    unix$ make -f proc.mk my_prog
    /u02/7016/bin/proc iname=my_prog.pc ireclen=132 oreclen=132 select_error=no
    Pro*C: Release 1.5.10.1.0 - Production on Thu Sep 1 15:09:47 1994
    Copyright (c) Oracle Corporation 1979, 1992. All rights reserved.
    Precompiling my_prog.pc
    /usr/5bin/cc -I. -O -Bdynamic -L/u02/7016/lib -o my_prog my_prog.c /u02/7016/li
    b/libsql.a /u02/7016/lib/osntab.o -lsqlnet -lora /u02/7016/lib/libpls.a -lsqlne
    t -lnlsrtl -lcv6 -lcore -lnlsrtl -lcv6 -lcore -lm
    The above example was done on a Sun with Oracle 7.0.16.6 and Pro*C 1.5.10.1.0.
    Your output may look a little different if you are on a different unix system.
    After running this command, several files should have been created in the
    current directory. my_prog.c is the C output from the precompiler.
    my_prog.lis is also generated by the precompiler, and is the listing file that
    gives you information about the precompilation. The executable will be called
    my_prog.
    II. How to use proc.mk for version 2.0 of Pro*C
    proc.mk for version 2.0 is much more generic. It is designed to link together
    programs that are in multiple modules, without modification. Again, the
    makefile itself is found in $ORACLE_HOME/proc/demo, along with the sample
    programs. In order to use it for a single module, you would use
    'make -f proc.mk EXE=<program name> OBJS=<program name>.o' (after copying
    proc.mk to your own directory). For example:
    unix$ make -f proc20.mk EXE=my_prog OBJS=my_prog.o
    /u03/oracle7.1/bin/proc iname=my_prog.pc
    Pro*C: Release 2.0.3.0.0 - Production on Thu Sep 1 15:55:26 1994
    Copyright (c) Oracle Corporation 1979, 1994. All rights reserved.
    System default option values taken from: /u03/oracle7.1/proc/pmscfg.h
    /usr/5bin/cc -I. -O -I/u03/oracle7.1/proc/lib -c my_prog.c
    /usr/5bin/cc -Bdynamic -L/u03/oracle7.1/lib -o my_prog my_prog.o -lsql /u03/ora
    cle7.1/lib/osntab.o -lsqlnet -lora -lsqlnet -lora -lnlsrtl -lcv6 -lcore -lnls
    rtl -lcv6 -lcore `cat /u03/oracle7.1/rdbms/lib/sysliblist`
    This will generate the same files as the previous example, plus my_prog.o,
    which is an object file containing the compiled form of your code. It is then
    linked with the Oracle libraries to create the executable.
    III. How does proc.mk work?
    To understand proc.mk, first we need to go into some details about how a
    makefile works. Makefiles are usually made up of two kinds of entries -
    targets and macro definitions.
    The general format of a target entry is
    <target>: <target1> <target2> ... <targetn>
    <command1>
    <command2>
    <commandm>
    Note that there are TABS, not spaces, before each of the <command> lines.
    This entry tells make how to create <target> from <target1> through
    <targetn>. To do this, make just needs to execute <command1> through
    <commandm>. For example, the target entry
    my_prog.c: my_prog.pc
    proc iname=my_prog.pc ireclen=132 oreclen=132
    tells make that to create my_prog.c, if my_prog.pc exists in the current
    directory, it just has to run 'proc iname=my_prog.c'. This target rule will be
    applied when 'make -f <makefile> my_prog.c' is issued from the unix prompt.
    Targets can be chained together as well. For example if you had the target
    entry
    my_prog.o: my_prog.c
    cc -c my_prog.c
    in addition to the one above, then make would be able to create my_prog.o from
    my_prog.pc by precompiling and compiling. Note that these two entries could
    have been combined into
    my_prog.o: my_prog.pc
    proc iname=my_prog.pc ireclen=132 oreclen=132
    cc -c my_prog.c
    which would have the same effect.
    There are also some special formats for targets, which don't depend on specific
    file names. For example, the following sequence of targets creates an object
    file from any .pc file:
    .SUFFIXES: .pc .c .o
    .pc.o:
    proc iname=$*.pc ireclen=132 oreclen=132
    cc -c $*.c
    Note the special syntax here. The .SUFFIXES rule tells make what suffixes
    to look for. The .pc.o rule (which has no dependencies) explains how to get
    from a .pc file to a .o file. Inside the commands, $* will evaluate to the
    filename (without the extension) of whatever file is currently being worked on.
    If we put the above example into a file (called example.mk) and run it, we get:
    unix$> make -f example.mk my_prog.o
    proc iname=my_prog.pc ireclen=132 oreclen=132
    Pro*C: Release 1.5.10.1.0 - Production on Mon Sep 19 15:53:22 1994
    Copyright (c) Oracle Corporation 1979, 1992. All rights reserved.
    Precompiling my_prog.pc
    cc -c my_prog.c
    unix$
    Notice that $* has been replaced with my_prog in the proc and cc commands.
    Also note that we had to type 'my_prog.o' on the command line. This is because
    the target rule was '.pc.o:'. If it was just '.pc:', then we wouldn't have
    needed the .o extension on the command line. But then make wouldn't know that
    this command creates a .o file. Make is smart enough to put together a .pc.c
    and a .c.o rule to create a .o file from a .pc file.
    The other kind of makefile entry is a macro definition. They usually look
    like:
    MACRONAME=macrotext
    This defines the macro MACRONAME to be macrotext. Whenever make sees
    $(MACRONAME) (Note the parenthesis), it will be replaced by macrotext. For
    example,
    PROFLAGS=ireclen=132 oreclen=132
    my_prog.c: my_prog.pc
    proc iname=my_prog.pc $(PROFLAGS)
    will accomplish the same thing as the first example in this section.
    '$(PROFLAGS)' will be replaced by 'ireclen=132 oreclen=132' (without the
    quotes).
    Macros can be defined more than once in a makefile. In that case, the
    definition that is last (furthest from the start) will be the one used for the
    entire file. Previous definitions are ignored.
    IV. Modifying proc.mk to change the precompile and compile options, and to
    add your own libraries
    NOTE: Be careful of changing too many options, especially the compile and/or
    link options. In many cases, changing these to values that are different from
    the supplied ones in proc.mk can cause problems. Contact Worldwide Support if
    you have questions about any of the compile or link options used in our default
    supplied makefiles.
    Consider this section of the makefile for Pro*C 1.5.10:
    # General suffix rule to build executables from .pc and .c files.
    # Usage :
    # make -f proc.mk USERID=<user/pass> <prog>
    # For example to build an executable from a Pro*C source file named 'abc.pc'
    # using scott/tiger for the ORACLE account name. The make command line will
    # be:
    # make -f proc.mk USERID=scott/tiger abc
    # Note: scott/tiger is the default account/password, so that you could
    # also use the following command line:
    # make -f proc.mk abc
    # The executable will be named 'abc'.
    .pc:
    -$(PROC) iname=$*.pc $(PROFLAGS)
    @$(ECHO) $(CC) $(CFLAGS) $(LDFLAGS) -o $* $*.c $(PROLDLIBS)
    .c:
    @$(ECHO) $(CC) $(CFLAGS) $(LDFLAGS) -o $* $*.c $(PROLDLIBS)
    These two target rules tell make how to precompile and compile. See the
    previous section for details on how these work. When you run the make, what
    actually gets executed are the commands under '.pc:'. The first line is the
    precompile, and the second is the compile. If you want to change the
    precompiler options, change the PROFLAGS macro. By default, it is set by
    PROFLAGS=ireclen=132 oreclen=132 select_error=no $(SQLCHECK) $(PROUSER)
    If you want to add the option maxopencursors=20, to change the initial size of
    the precompiler cache, you would add it to this line:
    PROFLAGS=ireclen=132 oreclen=132 select_error=no maxopencursors=20
    Note that I have removed the SQLCHECK and PROUSER macros. They are not
    defined by default, so they do not evaluate to anything. You can define them
    if you like, which can be used to add additional options such as SQLCHECK and
    USERID. See the precompiler manual for more information about the available
    precompiler options.
    Similarly, you can set compile options with CFLAGS and link options with
    LDFLAGS. Appendix B lists other macros used by proc.mk which you may find
    useful.
    In order to add additional libraries to the link, you can add them to the
    PROLDLIBS macro. proc.mk for 1.5.10 (on the Sun) defines this macro as:
    PROLDLIBS= $(LIBSQL) $(TTLIBS)
    LIBSQL and TTLIBS are other macros previously defined. You can add your own
    libraries to this macro to add them to the link:
    PROLDLIBS= $(LIBSQL) $(TTLIBS) my_lib1.o my_lib2.o
    Better results are obtained if you add your own libraries either after or
    before the Oracle libraries. Putting your libraries in between LIBSQL and
    TTLIBS can cause undefined symbols.
    V. Modifying proc.mk for a program which has more than one source module
    Many complicated programs are contained in more than one source module, unlike
    the samples. Some of these modules would contain only C functions, and thus
    have .c extensions. But the rest would contain embedded SQL as well, and
    consequently have .pc extensions. How would you compile and link in a
    situation such as this? In the remainder of this section, I present one
    solution.
    This solution uses the following files, which are included in Appendix A:
    File Functions Contained in the File Functions Called by this File
    main.c main db_connect, print_names,
    db_disconnect
    connect.pc db_connect, db_disconnect, none
    sqlerror
    print_names.pc print_names none
    main.h db_connect, db_disconnect,
    print_names, sqlerror (This is the header file)
    For Pro*C 2.0, proc.mk can compile these together by using the EXE and OBJS
    macros. The first target in the makefile (which will be executed if you don't
    specify a target on the make line) looks like:
    build: $(OBJS)
    $(CC) $(LDFLAGS) -o $(EXE) $(OBJS) $(PROLDLIBS)
    There are also default rules that tell make how to get from a .pc file to a .o
    file:
    .SUFFIXES: .exe .o .c .pc
    .pc.c:
    $(PROC) $(PROFLAGS) iname=$*.pc
    .pc.o:
    $(PROC) $(PROFLAGS) iname=$*.pc
    $(CC) $(CFLAGS) $(PROCINC) -c $*.c
    .c.o:
    $(CC) $(CFLAGS) $(PROCINC) -c $*.c
    So you can define the EXE macro to be the name of the executable, and the OBJS
    macro to be the object files used. You can either do this in the makefile
    itself (and then run it with 'make -f proc.mk') or, define them on the command
    line. To compile the example, use:
    make -f proc.mk EXE=main OBJS="connect.o print_names.o main.o"
    Note the double quotes around the object lists. This is to pass the spaces as
    part of the macro.
    For Pro*C 1.5, consider the following, which should be added to the end of the
    makefile:
    OBJECTS=main.o print_names.o connect.o
    main: $(OBJECTS)
    @$(ECHO) $(CC) $(CFLAGS) -o main $(OBJECTS) $(PROLDLIBS) \\
    $(CLIBS)
    main.o: main.c main.h
    @$(ECHO) $(CC) $(CFLAGS) -c main.c
    connect.o: connect.pc main.h
    @$(ECHO) $(PROC) iname=connect.pc $(PROFLAGS)
    @$(ECHO) $(CC) $(CFLAGS) -c connect.c
    print_names.o: print_names.pc main.h
    @$(ECHO) $(PROC) iname=print_names.pc $(PROFLAGS)
    @$(ECHO) $(CC) $(CFLAGS) -c print_names.c
    If you are not on a Sun as I am, the commands under connect.o and print_names.o
    should be the same as those under the '.pc:' target. Under main.o, the command
    should be the same as that under '.c:'. Compare the commands given here to
    those from my proc.mk, shown at the beginning of section IV.
    Again note that there are TABS, not spaces, before the command lines for
    precompilation and compilation, in accordance with the makefile format. With
    the above lines added to the end of proc.mk, we can create the executable by
    issuing 'make -f proc.mk main'. The output I get when running for the first
    time (no additional files beyond the original 4 exist) is:
    technique /home/csupport/surman/make> make -f proc.mk main
    /usr/5bin/cc -I. -O -c main.c
    /u02/7016/bin/proc iname=print_names.pc ireclen=132 oreclen=132 select_error=no
    Pro*C: Release 1.5.10.1.0 - Production on Wed Sep 21 17:37:02 1994
    Copyright (c) Oracle Corporation 1979, 1992. All rights reserved.
    Precompiling print_names.pc
    /usr/5bin/cc -I. -O -c print_names.c
    /u02/7016/bin/proc iname=connect.pc ireclen=132 oreclen=132 select_error=no
    Pro*C: Release 1.5.10.1.0 - Production on Wed Sep 21 17:37:06 1994
    Copyright (c) Oracle Corporation 1979, 1992. All rights reserved.
    Precompiling connect.pc
    /usr/5bin/cc -I. -O -c connect.c
    /usr/5bin/cc -I. -O -o main main.o print_names.o connect.o /u02/7016/lib/libsql
    .a /u02/7016/lib/osntab.o -lsqlnet -lora /u02/7016/lib/libpls.a -lsqlnet -lnlsr
    tl -lcv6 -lcore -lnlsrtl -lcv6 -lcore -lm -lm
    After running as above, a number of additional files are created. The
    files connect.lis and print_names.lis are generated by the
    precompiler, along with connect.c and print_names.c. Each of the .c
    files is then compiled with the '-c' option to create a .o file. So
    we get main.o, connect.o, and print_names.o. Finally, the object
    files are linked together to form the final executable, which is
    called 'main'.
    What are all these files? The .c extension signifies a file
    containing pure C code. The main program is in main.c to start with.
    The .pc extension signifies a file containing C code with embedded
    SQL, suitable for precompiling. The precompiler generates the .c file
    from the .pc file. The .lis extension signifies a listing file, also
    generated by the precompiler. It contains a trace of the
    precompilation attempt. Files with the .o extension are library
    files. They contain compiled code, and can be linked together into
    one executable. Different compilers can generate .o files, created
    from source files written in different languages. All of the .o files
    can be linked together, regardless of the original source language.
    main.h is the header file. This contains external definitions for
    the functions referenced by each module. This is necessary so the compiler
    will understand the correct prototype for each function. Note that
    it is referenced on the target line for each file. This is so
    the files are recompiled when the header file is changed.
    The linking is done by the final cc command, located under the make
    target main:
    @$(ECHO) $(CC) $(CFLAGS) -o main $(OBJECTS) $(PROLDLIBS) \\
    $(CLIBS)
    The only new thing here is the -o option. This is an option to the
    cc command which tells the compiler the name of the output file. In
    this case, it is called 'main'. If no output file is specified, the
    compiler usually calls it 'a.out'.
    Using this method has the advantage that make will only compile those files
    which need to be changed. For example, consider the main target:
    main: $(OBJECTS)
    @$(ECHO) $(CC) $(CFLAGS) -o main $(OBJECTS) $(PROLDLIBS) \\
    $(CLIBS)
    Whenever one of $(OBJECTS) (in this case, the object files created
    by compilation) has changed, make will run the commands under this
    target (in this case, the link command).
    What this means is that only those files which have been changed will
    be recompiled. If you change print_names.pc (try "touch print_names.pc"
    from the unix prompt) and run make, you will get only:
    unix$ touch print_names.pc
    unix$ make -f proc.mk main
    /u02/7016/bin/proc ireclen=132 oreclen=132 select_error=no iname=print_names.pc
    Pro*C: Release 1.5.10.1.0 - Production on Wed Sep 21 17:48:48 1994
    Copyright (c) Oracle Corporation 1979, 1992. All rights reserved.
    Precompiling print_names.pc
    /u02/7016/bin/proc iname=print_names.pc ireclen=132 oreclen=132 select_error=no
    Pro*C: Release 1.5.10.1.0 - Production on Wed Sep 21 17:48:50 1994
    Copyright (c) Oracle Corporation 1979, 1992. All rights reserved.
    Precompiling print_names.pc
    /usr/5bin/cc -I. -O -c print_names.c
    /usr/5bin/cc -I. -O -o main main.o print_names.o connect.o /u02/7016/lib/libsql
    .a /u02/7016/lib/osntab.o -lsqlnet -lora /u02/7016/lib/libpls.a -lsqlnet -lnlsr
    tl -lcv6 -lcore -lnlsrtl -lcv6 -lcore -lm -lm
    unix$
    Notice that the only thing that was done here was to precompile and
    compile print_names.pc, generating print_names.o. Then, since main
    depends on print_names.o, the final cc command (which links the final
    executable) was also done. So the same make command will only
    recompile those modules which have changed. This can be significant
    when linking in many modules, some of which can take a long time to
    compile. For more information on the make command, I suggest that you
    look at a Unix or make manual. One such book is "Managing Projects
    with Make", by Andrew Oram and Steve Talbott.
    Note that you can create suffix rules for the proc.mk for 1.5, similar to the
    ones for Pro*C 2.0. By using suffix rules, it is possible to shorten this
    example. The commands for each of the .pc files are identical. Rather
    than having a separate entry for each one, you can create general
    suffix rules that tell make how to create a .o file from a .pc file, for
    example. For more information on how to do this, I recommend that you
    consult a book or tutorial on make, such as the book referenced above.
    VI. How to link OCI programs using proc.mk or oracle.mk
    The libraries used to link OCI programs are very similar to the libraries used
    to link Pro*C programs. The main difference is that OCI programs link with
    libocic.a, and Pro*C programs link with libsql.a. Both can be found under
    $ORACLE_HOME/lib for Oracle7, and $ORACLE_HOME/rdbms/lib for version 6.
    For Oracle7, you can use either proc.mk or oracle.mk to link OCI code.
    oracle.mk is a makefile found in $ORACLE_HOME/rdbms/lib, and is used mainly for
    linking various options into the Oracle RDBMS itself, as well as for linking
    the Oracle executables. There are also targets in oracle.mk which will link
    the sample OCI programs cdemo1.c through cdemo3.c. Following are these
    targets, taken from the oracle.mk for 7.0.16 on Sun:
    OCILDLIBS= $(LIBOCIC) $(TTLIBS) $(LLIBCORE)
    INCLUDE= -I$(ORACLE_HOME)/rdbms/demo
    MAKEDEMO= \\
    @if [ "$(NONDEFER)" = "true" -o "$(NONDEFER)" = "TRUE" ] ; then \\
    $(ECHO) $(CC) $(LDFLAGS) -o $@ $? $(NDFOPT) $(OCILDLIBS) $(CLIBS); \\
    else \\
    $(ECHO) $(CC) $(LDFLAGS) -o $@ $? $(OCILDLIBS) $(CLIBS); \\
    fi
    cdemo1: cdemo1.o
    $(MAKEDEMO)
    .c.o:
    $(CC) -c $(INCLUDE) $(CFLAGS) $*.c
    First note the '.c.o' target rule. Note that the INCLUDE macro is here, which
    has the -I compiler option to include the directory where the demo header files
    are located. The cdemo1 target will execute the MAKEDEMO macro. Based on
    whether or not the NONDEFER macro is "true" or "TRUE", the program is linked
    either with or without the nondeferred option. Notice that if NONDEFER is true,
    then the NDFOPT macro is included in the link. If NONDEFER isn't true, then
    NDFOPT isn't included. That's the only difference. If you link with the
    nondeferred option, than deferring the parse with the defflg parameter of
    oparse() has no effect. See the OCI manual for more information on the
    oparse() function and what it does. In most cases, you will want the ability
    to defer the parse, and so you wouldn't link with NDFOPT. Other than NDFOPT,
    the libraries to link with are OCILDLIBS and CLIBS. So you can use these
    macros in your own makefile to link OCI programs.
    proc.mk can also be used to link OCI programs. Like oracle.mk, it also defines
    OCILDLIBS. The link line would look like the line under the .pc: target used
    for Pro*C programs, but would use OCILDLIBS instead of PROLDLIBS:
    @$(ECHO) $(CC) $(CFLAGS) $(LDFLAGS) -o $* $*.c $(OCILDLIBS)
    Note that proc.mk does not link with the nondeferred option. For version 6,
    there are no OCI targets in oracle.mk, so you should use proc.mk as the
    template to link OCI programs. For Oracle7, use either proc.mk or oracle.mk.
    VII. Some issues about linking
    Most unix linkers are one-pass. This means that the linker will only examine
    the symbols in your executable once. Because of this, several of the Oracle
    libraries need to be included more than once to resolve all of the symbols.
    This is because the libraries are mutually referencial - functions in one
    library call functions in another, and the second library in turn calls
    functions in the first library. As a result, it is not recommended that you
    change the order of the libraries in the link. If you add your own libraries,
    add them either before or after the Oracle libraries. Don't put them between
    Oracle libraries on the link line. The Oracle libraries would be PROLDLIBS for
    Pro*C programs, and OCILDLIBS for OCI programs. If you use a utility such as
    'nmake', you should be aware of how that differs from 'make', as well. Macro
    processing can be different between the two utilities.
    You should also be aware that the specific Oracle libraries used vary between
    operating systems and Oracle versions. If you upgrade the precompiler and the
    database, chances are that the libraries necessary will also change. So you
    may have to change any existing makefiles. Always use the proc.mk that ships
    with the precompiler as a guide to which libraries are necessary.
    There are two different ways to specify a library to be included in the link.
    One is to fully qualify the name of the library (such as /u02/7016/lib/libsql.a
    in the above example). Another is to use the -l option. If you specify a
    library (such as -lnlsrtl) this tells the linker to look for a library called
    libnlsrtl.a in the library search path. To add directories to the library
    search path, use the -L option. For example, the LDFLAGS macro should contain
    -L$(ORACLE_HOME)/lib. This tells the linker to look in this directory to find
    libraries specified with -l. Some of the Oracle libraries are fully qualified,
    and some are included with -L and -l. Both have the same effect.
    You can create your own libraries by using the 'ar' unix command. This utility
    allows you to archive several .o object files into one .a library archive.
    Consult your unix man pages on 'ar' for more information on this command and
    how to use it.
    Appendix A: Source code for the multiple module example
    Here are the files used in this example:
    **** FILE main.h ****
    extern void sqlerror();
    extern void connect();
    extern void print_names();
    extern void disconnect();
    *** FILE main.c ****
    #include <stdio.h>
    #include "main.h"
    void main() {                                                                 
    int dept;
    printf("Hello There!\
    printf("Now connecting...\
    connect("scott", "tiger");
    printf("Enter dept no: ");
    scanf("%d", &dept);
    print_names(dept);
    printf("Disconnecting...\
    disconnect();
    **** FILE connect.pc ****
    #include <stdio.h>
    #include "main.h"
    EXEC SQL include sqlca;
    void connect(username, password)
    char *username;                                                                
    char *password;  {                                                             
    EXEC SQL begin declare section;
    VARCHAR un[20];
    VARCHAR pw[20];
    EXEC SQL end declare section;
    strcpy(un.arr, username);
    un.len = strlen(un.arr);
    strcpy(pw.arr, password);
    pw.len = strlen(pw.arr);
    EXEC SQL whenever sqlerror do sqlerror();
    EXEC SQL connect :un identified by :pw;
    void disconnect() {                                                           
    EXEC SQL commit work release;
    void sqlerror() {                                                              
    printf("SQL error!!\
    EXEC SQL whenever sqlerror continue;
    printf("% .70s \
    ",sqlca.sqlerrm.sqlerrmc);
    EXEC SQL rollback release;
    exit(1);
    **** FILE print_names.pc ****
    #include <stdio.h>
    #include "main.h"
    EXEC SQL include sqlca;
    EXEC SQL begin declare section;
    VARCHAR ename[20];
    EXEC SQL end declare section;
    void print_names(dept)
    EXEC SQL begin declare section;
    int dept;
    EXEC SQL end declare section; {                                               
    EXEC SQL whenever sqlerror do sqlerror();
    EXEC SQL DECLARE emp_cursor CURSOR FOR
    select ename
    from emp
    where deptno = :dept;
    EXEC SQL OPEN emp_cursor;
    EXEC SQL whenever not found goto done_loop;
    printf("Employees in dept %d:\
    ", dept);
    for (;;) {                                                                   
    EXEC SQL fetch emp_cursor into :ename;
    ename.arr[ename.len] = '\\0';
    printf("%s\
    ", ename.arr);
    done_loop:
    EXEC SQL CLOSE emp_cursor;
    Appendix B. List of useful makefile macros
    Note that many of these macros are defined, but not all of them. proc.mk for
    Pro*C 2.0, for example, uses PROFLAGS in the precompile targets, but does not
    define it.
    PROFLAGS: options to be passed to the precompiler, such as ireclen or
    sqlcheck
    CFLAGS: options to be passed to the compiler, such as -I or -O
    LDFLAGS: options to be passed to the linker, such as -L
    CC (or RCC): the C compiler (/usr/5bin/cc for Sun)
    PROC: the precompiler ($ORACLE_HOME/bin/proc)
    LIBHOME: directory in which to find the Oracle libs ($ORACLE_HOME/lib for
    Oracle7, $ORACLE_HOME/rdbms/lib for version 6)
    LIBxxx: Oracle library libxxx.a fully qualified (such as LIBSQL, equal to
    $(LIBHOME)/libsql.a)
    LLIBxxx: Oracle library libxxx.a, using -l (such as LLIBCORE, equal to
    -lcore)
    PROLDLIBS: Oracle libraries necessary to link (defined in terms of other
    macros)
    OCILDLIBS: Oracle libraries necessary to link programs using the Oracle
    Call Interfaces (OCI) (also defined in terms of other macros)
    ______________________________________________________________________________

    Robert B     gin (self) (guest) wrote:
    : Robert B     gin (guest) wrote:
    : : Since I've last posted, I've installed RedHat 5.2 and
    ditched
    : : Slackware!
    : : (btw, what a breeze - Hat's off to RH! very nice install!).
    : : I've then installed oracle, have managed to setup
    tnsnames.ora
    : : so I can connect via sqlplus to my remote database (on
    : VAX/VMS).
    : : But now I have Pro*C linker problems with:
    : : make -f demo_proc.mk build OBJS=test.o exe=test
    : : (blah,blah,blah)
    : : /usr/lib/crt1.o(.text+0x36): undefined reference to `main'
    : : make: *** [build] Error 1
    : : Does anybody out there have a similar problem?
    : : Rob
    : Duh! forget it... (EXE has to be caps... RTFM)
    : (cryptic error message though?)
    : works great!!!
    Could you please tell me where I can get demo_proc.mk file
    for Linux (RedHat)?
    Thanks
    null

  • Error while compiling Pro*C program

    Hi,
    I get the following error while compiling and linking Pro*C program.
    /home/barts/builddir $ make build_get_plc_data
    Making Object files for get_plc_data.c
    /usr/ccs/bin/cc -c +DD64  -I. -I../lib  -I/u01/dba/oracle/product/1012ias/precomp/public get_plc_data.c
    /usr/ccs/bin/cc -o get_plc_data get_plc_data.o -L/u01/dba/oracle/product/1012ias/lib -lclntsh +DD64
    ld: Unsatisfied symbol "sqlcx2t" in file get_plc_data.o
    ld: Unsatisfied symbol "main" in file <no file>
    2 errors.
    *** Error exit code 1 (ignored)
    /bin/rm -f get_plc_data.o
    Please suggest what could be causing this issue?
    Regrads,
    Dhivya

    I don't see a specific Proc or precompiler forum around here.
    Perhaps your best bet would be at [Call interface (OCI)|http://forums.oracle.com/forums/forum.jspa?forumID=67] forum or maybe [SQL and PL/SQL|http://forums.oracle.com/forums/forum.jspa?forumID=75] since it's more of a developers' forum.

  • 변화된 PRO*C, OCI LIBRARAY (V7.2- V7.3)

    제품 : PRECOMPILERS
    작성날짜 : 1997-10-08
    V7.3 에서 바뀐 library
    ======================
    oracle.mk makefile 을 살펴보면 libserver.a , libclient.a 를 발견할수있다.
    이것들은 v7.2 의 libora.a 과 libocic.a 가 아니고 efficiency 를 위해 다른 libraray 와 combind 되어 있다.
    libora.a -> libserver.a
    libocic.a -> libclient.a
    참고로 V7.2 에서 v7.3 으로 가면서 없어진 library 는
    -lora
    -lrt
    없어지지는 않았지만 명시할 필요가 없는 library 는
    -lpls
    osntab.o 이다.
    새롭게 추가된 library 는
    -lclient
    -lncr
    -lcommon
    -lgeneric
    -lepc
    -lepcpt 이다.
    다음은 pro*c 2.0 의 MACRO 이다.
    PROFLAGS: options to be passed to the precompiler, such as ireclen or
    sqlcheck
    CFLAGS: options to be passed to the compiler, such as -I or -O
    LDFLAGS: options to be passed to the linker, such as -L
    CC (or RCC): the C compiler (/usr/5bin/cc for Sun)
    PROC: the precompiler ($ORACLE_HOME/bin/proc)
    LIBHOME: directory in which to find the Oracle libs ($ORACLE_HOME/lib for
    Oracle7, $ORACLE_HOME/rdbms/lib for version 6)
    LIBxxx: Oracle library libxxx.a fully qualified (such as LIBSQL, equal to
    $(LIBHOME)/libsql.a)
    LLIBxxx: Oracle library libxxx.a, using -l (such as LLIBCORE, equal to
    -lcore)
    PROLDLIBS: Oracle libraries necessary to link (defined in terms of other
    macros)
    OCILDLIBS: Oracle libraries necessary to link programs using the Oracle
    Call Interfaces (OCI) (also defined in terms of other macros)

    There has been reported several issues reported on the forum related to the 9i to 10g
    Pro*C migration, you may want to take a look at some of them.
    Pro*C Migration from to 9i to 10g
    Re: Oracle 10g and PROC*C
    Re: Oracle 10g and PROC*C
    Re: PRO*C on Windows
    Re: Pro*C/C++ Precompiler
    Hope this helps.
    ~ Madrid.

  • Error while compiling xdk C sample program

    hello,
    the following error happens with xdk version 9.2.0.6 and oracle 9.2.0.4 installed on linux SUSE 9.1:
    while compiling the xdk C sample program "SAXSample.c" in
    $ORACLE_HOME/xdk/demo/c/parser, I got many "undefined reference" messages.
    Here follows an excerpt of the first few lines of the error log:
    oracle@cassius:/exp/oracle/xdk/demo/c/parser> make SAXSample
    cc -o SAXSample -I ../../../../xdk/include SAXSample.c -L ../../../../lib -lxml9 -lxsd9 -lcore9 -lnls9 -lunls9 -lcore9 -lnls9 -lcore9 -lnls9 -lnsl -lm -lpthread
    ../../../../lib/libxml9.a(lpxerr.o)(.text+0x4d9): In function `LpxErrVPrintf':
    : undefined reference to `__ctype_b'
    ../../../../lib/libxml9.a(lpxm.o)(.text+0x37dd): In function `LpxmA2L':
    : undefined reference to `__ctype_b'
    ../../../../lib/libxml9.a(lpxm.o)(.text+0x38f9): In function `LpxmA2UL':
    : undefined reference to `__ctype_b'
    and so on.
    Has anybody had this problem before? What's wrong with the libraries?
    Thanks in advance.

    I don't see a specific Proc or precompiler forum around here.
    Perhaps your best bet would be at [Call interface (OCI)|http://forums.oracle.com/forums/forum.jspa?forumID=67] forum or maybe [SQL and PL/SQL|http://forums.oracle.com/forums/forum.jspa?forumID=75] since it's more of a developers' forum.

  • PRO*C VERSION MATRIX 및 VERSION 별 특성

    제품 : PRECOMPILERS
    작성날짜 : 1998-02-19
    PRO*C version matrix 및 version 별 지원 내용
    ===========================================
    [1] PRO*C 의 version 별 지원 내용
    RDBMS 의 version 과 PRO*C 의 version 별 지원내용은 다음과 같다.
    PRO*    Last    RDBMS    Languages
    Version Version Version
    ======================================================================
    1.3     1.3.20  <6.0.35      PRO*C
    1.4     1.4.15/6 6.x          "
    1.5     1.5.10   7.0.x        "
    1.6     1.6.7    7.1.x        "
    1.6     1.6.9    7.2.x        "
    2.0     2.0.6    7.1.x        "
    2.1     2.1.3    7.2.x        "
    2.2     2.2.?    7.3.x        "
    [2] 각 version 의 pro*c의 precompile option 추가 부분과 header file
    위치는 다음과 같다.
    (1) version 1.4
    Location: $ORACLE_HOME/proc/demo
    File: proc.mk
    Build from "prog.pc":  make -f proc.mk prog
    Where to add options:  edit PRO14FLAGS
    Header files in:       $ORACLE_HOME/proc/lib
    (2) version 1.5
    Location: $ORACLE_HOME/proc/demo
    File: proc.mk
    Build from "prog.pc":  make -f proc.mk prog
    Where to add options:  edit PROFLAGS
    Header files in:       $ORACLE_HOME/proc/lib
    (3) verion 1.6 , 1.7,1.8
    Location: $ORACLE_HOME/proc16/demo
    File: proc16.mk
    Build from "prog.pc":  make -f proc.mk prog
    Where to add options:  edit PCCFLAGS
    Header files in:       $ORACLE_HOME/sqllib/public
    (4) version 2.0, 2.1
    Location: $ORACLE_HOME/proc/demo
    File: proc.mk
    Build from "prog1.pc": make -f proc.mk EXE=prog OBJS="prog1.o prog2.o"
      and "prog2.pc"
    Where to add options:  add PROFLAGS
    Header files in:       $ORACLE_HOME/sqllib/public
    (5) version 2.2
    Location: $ORACLE_HOME/precomp/demo/proc
    File: proc.mk
    Build from "prog1.pc": make -f proc.mk build EXE=prog OBJS="prog1.o
    prog2.o"
      and "prog2.pc"
    Where to add options:  add PROCFLAGS
    Header files in:       $ORACLE_HOME/precomp/public
    [3]다음은 각 VERSION 별 지원 내용을 살펴 보기로 한다.
    (1) VERSION 1.4
    1. precompiler option 의 추가된 부분은 LINES=YES option지정시 outpute 에
    #line directives 생성 지원되어debugging 에 도움울 줄수 있게
    되었으며, dynamic method 사용시 HOLD_CURSOR=YES option을 사용하여
    cursor의 재사용을 방지할 수 있게 되었다. AREASIZE,REBIND option 이
    없어지고 MODE=ANSI14 option 을 지원 가능하게 되었다. 그러나 이 ANSI14
    option 을 사용시는 4byte inter 인 SQLCODE 를 반드시 declare 해야 한다.
    SQLCHECK=SEMANTICS/SYNTAX/NONE (Default는 SYNTAX) 가 사용되고, 더이상
    log를 db에 기록하지 않게 되었다.
    2  Datatype equivalencing 지원 한다.
        EXEC SQL VAR host_variable IS datatype ;
        EXEC SQL TYPE type is datatype REFERENCE ;
    3. Indicator 변수를 사용가능 ( :host INDICATOR :indicator ) 하게
    되었으며 또한 AT 절에 host 변수를 사용가능하게 되었다. 또host변수
    선언시 auto, extern, static, const, volatile 사용 가능하다.
    4. SQLCA 의 sqlerrd(5) 에 0 based parse offset을 저장하였으나, v2.x 의
    현재 version 에서는 사용되어지지 않고있다..
    5 procedure call 이 가능하게 되었다. (EXEC SQL WHENEVER ... DO
    procedure) .
      또한 EXEC SQL WHENEVER ... DO break; 문이 사용가능하다 .
    6. Precompiler 실행모듈이 각 언어마다 구분되어 pro*c 의 경우function의
    prototypes 생성
       가능하다.
    (2) Version 1.5
    ============
    이 version 은 ORACLE RDBMS 7.x 를 지원하는 pro*c version 으로 완벽한
    ANSI SQL을 지원한다. 또한 NLS 의 support 도 지원가능하다
    1. precompile option 의 변경사항으로는 DBMS=NATIVE/V6/V7 option
    지원하며 FIPS=YES로 설정시 ANSI extension 지원한다.
    2.  data type 변경사항으로는 fixed length datatypes 지원하는 CHARF,
    CHARZ가 사용가능하며 LONG VARCHAR,LONG VARRAW datatypes 지원가능하다.
    또한 MLSLABEL 데이타 타입사용 가능하게 되었는데 이는 variable_lengrh
    의 binary OS label 을 저장할때 사용가능하다.
    3. indicators 없는 host 변수가 null을 fetch하면, DBMS=V6으로
    설정하지 않은 경우는
       ORA-1405를 return 함. PL/SQL table을 파라미터로 하는 stored
    procedures 호출 가능.
    4. 이전 version 에서 space 만 가능했던 (bug) input character string
    데이타 타입이
       terminator를 포함하는 경우도 이를 데이타로 인식 가능
    (3) version 1.6
    ==================
    1.변경된 precompile option 으로 AUTO_CONNECT=YES option
    지원하는데
    이를 지정시는 처음 sql 문 수행시 OPS$<username>으로 자동 connect 된다. 
    또한 CONFIG=<file> option 지원으로 user 의 configuration 의 name 과
    위치를 지정할수 있다. 또한 시스템 config file 사용 가능한데 이의 위치는
    UNIX = $ORACLE_HOME/proc16/pccc.cfg, VMS=ora_pcc:pccc.cfg. 이다.
    2. SQLSTATE 변수는 SQL문 실행 이후에 값이 설정된다. MODE=ANSI로 설정이
    되어 있고, declare section안에 선언되어 있는 경우에만 이값이 설정된다. 
    만일 그렇지 않으면 이 값은 무시된다.만약 SQLCODE가 안에 선언되어 있다면,
    이 두 변수 모두 값이 설정된다.
     만약 SQLCODE가 밖에 선언되어 있다면 SQLSTATE만 설정된다. SQLSTATE는
    coding scheme를 표준화하는데 사용된다. SQLCODE는 declare section
    내부에 선언되거나, SQLSTATE, SQLCA가 사용되지 않는 경우에 사용하게 된다.
    이 점은 1.5 버젼에서 SQLCA를 declare section 밖에 선언하여, SQLCA와
    같이 사용되었던 것과는 차이가 있다.
    3. SQLGLS 함수 지원하는데 이는 마지막 문장을 parse 한 후, 문장의 길이
    및 타입을 return한다. 
    eg) int sqlgls(char *sqlstm ,size_t
    *stmlen,size_t *sqlfc)
    4. select 문에서 stored function 을 call 할수 있다.
    5. 단 SQLCHECK=FULL/SEMANTICS 가 아닌 경우에 FROM 절에서 subquery 가
    가능하다. 이는 PL/SQL 의 semantic check 인 경우는 v7.3 에서 가능하다 .
    (4) Version 1.8
    ================ 
    1. INDICATOR VARIABLE을 사용하지 않고도 NULL FETCH시 ORA-1405 에러가
    발생하지 않도록 UNSAFE_NULL=YES 옵션이 추가됨. UNSAFE_NULL=YES로
    설정하면 ORA-1405 를 방지하기 위해서 DBMS=V6 으로 세팅할 필요없이
    DBMS=V7 으로 할 수 있음. 단, UNSAFE_NULL=YES를 사용하기 위해서는
    MODE=ORACLE 로 설정해야 함.
    2. PACKAGE ARGUMENT로 PL/SQL CURSOR(WEAKLY TYPED)를 사용할 수 있는데
    예를 들면 TYPE GeneralCurTyp IS REF CURSOR;
    3. FROM 절에서 SUBQUERY를 사용할 수 있고 SQLCHECK=SEMANTICS 또는
    SQLCHECK=FULL 옵션을 사용할 수 있음.
    4. PL/SQL 블럭에서 PL/SQL TABLE과 이와 관련된 다음 함수를 지원.
     a_table(index).EXISTS, a_table.COUNT, a_table.FIRST, a_table.LAST,
    a_table.PRIOR(index), a_table.NEXT(index),
    a_table.DELETE(start_index,_index), a_table.DELETE.
    5. WHERE CURRENT OF CURSOR를 이용해서 MULTI-TABLE VIEW를 통해
    KEY-PRESERVED TABLE을 UPDATE 가능.
    (5) version 2.0
    ==================
    RDBMS version 7.3에서 부터 makefile 은
    ins_precomp.mk,env_precomp.mk, proc.mk의 3 개로 나뉘었다.
    Ins_precomp.mk 는 기존의 proc.mk 처럼 precompiler executables 를 build
    하기 위한 routine 이고 env_precomp.mk 는 모든 environment 의 변수와
    libraray 를 포함한다.
    이 file 은 Ins_precomp.mk 와 proc.mk 에 포함되어 사용되어진다.
    1. V1.6과 같이 AUTO_CONNECT, CONFIG 옵션 지원. SYSTEM CONFIGURATION
    FILE은 UNIX에서는 $ORACLE_HOME/proc/pmscfg.h 이고 VMS에서는
    ora_proc20:pmscfg.cfg
    2. V1.6과 같이 SQLSTATE 변수와 SQLGLS 함수가 제공된다.
    3. C PREPROCESSOR가 포함되어서 #define이 EMBEDDED SQL과 함께 이용될 수
    있고 #include 로 PRO*C 헤더화일을 INCLUDE 가능.
    4. 구조체를 HOST 변수로 사용 가능. 이것은 SELECT INTO, FETCH INTO 
    또는 INSERT시 VALUES 절에 사용될 수 있으나 PL/SQL PROCEDURE에 PL/SQL
    RECORD ARGUMENT로 사용할 수는 없음. 구조체 내에 또다른 구조체를 포함할
    수는 없지만 ARRAY는 포함할 수 있음.
    5. HOST 변수를 BEGIN/END DECLARE SECTION 안에 넣을 필요가 없음.
    6. V1.6에서 처럼 SELECT LIST에 STORED FUNCTION의 사용이 가능.
    7. SQLCHECK=FULL/SEMANTOCS를 사용하지 않는 경우 FROM 절에 SUBQUERY를
    쓸 수 있음.
    8. CHARACTER 변수의 BIND TYPE은 MODE 옵션이 아니라 DBMS 옵션에 따라서
    결정됨. DBMS=V6/V6_CHAR 인 경우, CHARACTER는 TYPE 1, DBMS=V7(또는
    NATIVE이고 ORACLE7에 접속할 때) 에서는 TYPE 97.
    9. DBMS=V6_CHAR 는 CHARACTER 변수가 가변 길이 문자열로 다루어질 수
    있도록 함.
    10. SQLVCP 함수는 VARCHAR ARR 변수를 지정한 길이로 만들어 주므로
    VARCHAR를 동적으로 할당할 때 COMPILER가 BYTE ALIGNMENT를 가능하게 함.
    11. PRO*C의 PARSE LEVEL을 설정하는 PARSE 옵션.
    a) NONE - PRO*C V1과 같음(HOST 변수를 DECLARE SECTION에 넣어야 함.
    #define 인식 안함 등)
    b) PARTIAL - HOST 변수를 DECLARE SECTION에 넣어야 함
    c) FULL - PRO*C V2의 기능 모두 지원
    12. EXEC SQL WHENEVER ... DO 함수명(args,...); 와 같이 함수호출시UMENT를
    주고 받을 수 있음.
    13. #ifdef/#ifndef 와 EXEC ORACLE IFDEF/IFNDEF 에서 사용하기 위한
    DEFINE 옵션 지원.
    (6) version 2.1
    ================
    1. PRO*C V1.7에서와 같이 char와 IMPLICIT VARCHAR (VARCHAR=YES 옵션과
    함께 적절한 C 구조체로 선언된 변수) HOST 변수에서 MULTI-BYTE NLS
    CHARACTER 데이타와 MULTI-BYTE 문자열을 지원.
     NLS_CHAR=var1,var2,... 옵션으로 MULTI-BYTE HOST 변수를 지정함.
    MULTI-BYTE 리터럴은 다음과 같이 사용된다.
     EXEC SQL SELECT ... WHERE ENAME = N*이경구*;
     단, 이것은 SQLLIB RUNTIME LIBRARY를 통해서 지원되기 때문에 MULTI-BYTE
    NLS 문자열은 DYNAMIC SQL에서 사용될 수 없음. NCHAR 데이타타입은 DDL 과
    함께 사용될 수 없음.
    2. PRO*C V1.7과 같이 NLS_LOCAL 옵션 지원
    3. DEF_SQLCODE=YES 로 설정하면 PRO*C는 다음 문장을 생성한다.
     #define SQLCODE sqlca.sqlcode
     SQLCA는 반드시 INCLUDE 되어야 하며 SQLCODE 변수는 선언되어서는 안됨.
    4. PRO*C V1.7 과 같이 CURSOR VARIABLE 지원.
    5. VARCHAR=YES 로 설정하면 특정한 구조체를 VARCHAR로 인식할 수 있다. 
    구조체의 형태를 보면
     struct
     short len;
     char arr[n];
     } host_var;
    6. CODE=CPP 로 설정하면 SQLLIB 함수 원형(PROTOTYPE)은 다음과 같이
    extern "C" 형식으로 생성됨.
     extern "C" {
     void sqlora( unsigned long *, void *);
     그리고 "//" 와 같은 COMMENT 처리명령을 인식함. 단, CODE=CPP인 경우
    PARSE 는 자동적으로 PARTIAL로 설정됨.
     CPP_SUFFIX 옵션은 PRECOMPILE된 화일의 확장자를 지정.
    SYS_INCLUDE=(dir1,dir2,...) 옵션은 C 헤더 화일과 다른 위치에 있는 C++
    헤더 화일이 있는 디렉토리를 지정. 이 옵션은 PARSE 옵션이 NONE이 아닌
    경우에만 필요하다. HEADER 화일을 찾는 위치는 SYS_INCLUDE, 현재 디렉토리,
    표준 SYSTEM 디렉토리(UNIX에서 PRO*C 헤더 화일의 위치는
    $ORACLE_HOME/sqllib/public), 그리고 INCLUDE 옵션에 지정된 디렉토리이다.

    제품 : PRECOMPILERS
    작성날짜 : 1998-02-19
    PRO*C version matrix 및 version 별 지원 내용
    ===========================================
    [1] PRO*C 의 version 별 지원 내용
    RDBMS 의 version 과 PRO*C 의 version 별 지원내용은 다음과 같다.
    PRO*    Last    RDBMS    Languages
    Version Version Version
    ======================================================================
    1.3     1.3.20  <6.0.35      PRO*C
    1.4     1.4.15/6 6.x          "
    1.5     1.5.10   7.0.x        "
    1.6     1.6.7    7.1.x        "
    1.6     1.6.9    7.2.x        "
    2.0     2.0.6    7.1.x        "
    2.1     2.1.3    7.2.x        "
    2.2     2.2.?    7.3.x        "
    [2] 각 version 의 pro*c의 precompile option 추가 부분과 header file
    위치는 다음과 같다.
    (1) version 1.4
    Location: $ORACLE_HOME/proc/demo
    File: proc.mk
    Build from "prog.pc":  make -f proc.mk prog
    Where to add options:  edit PRO14FLAGS
    Header files in:       $ORACLE_HOME/proc/lib
    (2) version 1.5
    Location: $ORACLE_HOME/proc/demo
    File: proc.mk
    Build from "prog.pc":  make -f proc.mk prog
    Where to add options:  edit PROFLAGS
    Header files in:       $ORACLE_HOME/proc/lib
    (3) verion 1.6 , 1.7,1.8
    Location: $ORACLE_HOME/proc16/demo
    File: proc16.mk
    Build from "prog.pc":  make -f proc.mk prog
    Where to add options:  edit PCCFLAGS
    Header files in:       $ORACLE_HOME/sqllib/public
    (4) version 2.0, 2.1
    Location: $ORACLE_HOME/proc/demo
    File: proc.mk
    Build from "prog1.pc": make -f proc.mk EXE=prog OBJS="prog1.o prog2.o"
      and "prog2.pc"
    Where to add options:  add PROFLAGS
    Header files in:       $ORACLE_HOME/sqllib/public
    (5) version 2.2
    Location: $ORACLE_HOME/precomp/demo/proc
    File: proc.mk
    Build from "prog1.pc": make -f proc.mk build EXE=prog OBJS="prog1.o
    prog2.o"
      and "prog2.pc"
    Where to add options:  add PROCFLAGS
    Header files in:       $ORACLE_HOME/precomp/public
    [3]다음은 각 VERSION 별 지원 내용을 살펴 보기로 한다.
    (1) VERSION 1.4
    1. precompiler option 의 추가된 부분은 LINES=YES option지정시 outpute 에
    #line directives 생성 지원되어debugging 에 도움울 줄수 있게
    되었으며, dynamic method 사용시 HOLD_CURSOR=YES option을 사용하여
    cursor의 재사용을 방지할 수 있게 되었다. AREASIZE,REBIND option 이
    없어지고 MODE=ANSI14 option 을 지원 가능하게 되었다. 그러나 이 ANSI14
    option 을 사용시는 4byte inter 인 SQLCODE 를 반드시 declare 해야 한다.
    SQLCHECK=SEMANTICS/SYNTAX/NONE (Default는 SYNTAX) 가 사용되고, 더이상
    log를 db에 기록하지 않게 되었다.
    2  Datatype equivalencing 지원 한다.
        EXEC SQL VAR host_variable IS datatype ;
        EXEC SQL TYPE type is datatype REFERENCE ;
    3. Indicator 변수를 사용가능 ( :host INDICATOR :indicator ) 하게
    되었으며 또한 AT 절에 host 변수를 사용가능하게 되었다. 또host변수
    선언시 auto, extern, static, const, volatile 사용 가능하다.
    4. SQLCA 의 sqlerrd(5) 에 0 based parse offset을 저장하였으나, v2.x 의
    현재 version 에서는 사용되어지지 않고있다..
    5 procedure call 이 가능하게 되었다. (EXEC SQL WHENEVER ... DO
    procedure) .
      또한 EXEC SQL WHENEVER ... DO break; 문이 사용가능하다 .
    6. Precompiler 실행모듈이 각 언어마다 구분되어 pro*c 의 경우function의
    prototypes 생성
       가능하다.
    (2) Version 1.5
    ============
    이 version 은 ORACLE RDBMS 7.x 를 지원하는 pro*c version 으로 완벽한
    ANSI SQL을 지원한다. 또한 NLS 의 support 도 지원가능하다
    1. precompile option 의 변경사항으로는 DBMS=NATIVE/V6/V7 option
    지원하며 FIPS=YES로 설정시 ANSI extension 지원한다.
    2.  data type 변경사항으로는 fixed length datatypes 지원하는 CHARF,
    CHARZ가 사용가능하며 LONG VARCHAR,LONG VARRAW datatypes 지원가능하다.
    또한 MLSLABEL 데이타 타입사용 가능하게 되었는데 이는 variable_lengrh
    의 binary OS label 을 저장할때 사용가능하다.
    3. indicators 없는 host 변수가 null을 fetch하면, DBMS=V6으로
    설정하지 않은 경우는
       ORA-1405를 return 함. PL/SQL table을 파라미터로 하는 stored
    procedures 호출 가능.
    4. 이전 version 에서 space 만 가능했던 (bug) input character string
    데이타 타입이
       terminator를 포함하는 경우도 이를 데이타로 인식 가능
    (3) version 1.6
    ==================
    1.변경된 precompile option 으로 AUTO_CONNECT=YES option
    지원하는데
    이를 지정시는 처음 sql 문 수행시 OPS$<username>으로 자동 connect 된다. 
    또한 CONFIG=<file> option 지원으로 user 의 configuration 의 name 과
    위치를 지정할수 있다. 또한 시스템 config file 사용 가능한데 이의 위치는
    UNIX = $ORACLE_HOME/proc16/pccc.cfg, VMS=ora_pcc:pccc.cfg. 이다.
    2. SQLSTATE 변수는 SQL문 실행 이후에 값이 설정된다. MODE=ANSI로 설정이
    되어 있고, declare section안에 선언되어 있는 경우에만 이값이 설정된다. 
    만일 그렇지 않으면 이 값은 무시된다.만약 SQLCODE가 안에 선언되어 있다면,
    이 두 변수 모두 값이 설정된다.
     만약 SQLCODE가 밖에 선언되어 있다면 SQLSTATE만 설정된다. SQLSTATE는
    coding scheme를 표준화하는데 사용된다. SQLCODE는 declare section
    내부에 선언되거나, SQLSTATE, SQLCA가 사용되지 않는 경우에 사용하게 된다.
    이 점은 1.5 버젼에서 SQLCA를 declare section 밖에 선언하여, SQLCA와
    같이 사용되었던 것과는 차이가 있다.
    3. SQLGLS 함수 지원하는데 이는 마지막 문장을 parse 한 후, 문장의 길이
    및 타입을 return한다. 
    eg) int sqlgls(char *sqlstm ,size_t
    *stmlen,size_t *sqlfc)
    4. select 문에서 stored function 을 call 할수 있다.
    5. 단 SQLCHECK=FULL/SEMANTICS 가 아닌 경우에 FROM 절에서 subquery 가
    가능하다. 이는 PL/SQL 의 semantic check 인 경우는 v7.3 에서 가능하다 .
    (4) Version 1.8
    ================ 
    1. INDICATOR VARIABLE을 사용하지 않고도 NULL FETCH시 ORA-1405 에러가
    발생하지 않도록 UNSAFE_NULL=YES 옵션이 추가됨. UNSAFE_NULL=YES로
    설정하면 ORA-1405 를 방지하기 위해서 DBMS=V6 으로 세팅할 필요없이
    DBMS=V7 으로 할 수 있음. 단, UNSAFE_NULL=YES를 사용하기 위해서는
    MODE=ORACLE 로 설정해야 함.
    2. PACKAGE ARGUMENT로 PL/SQL CURSOR(WEAKLY TYPED)를 사용할 수 있는데
    예를 들면 TYPE GeneralCurTyp IS REF CURSOR;
    3. FROM 절에서 SUBQUERY를 사용할 수 있고 SQLCHECK=SEMANTICS 또는
    SQLCHECK=FULL 옵션을 사용할 수 있음.
    4. PL/SQL 블럭에서 PL/SQL TABLE과 이와 관련된 다음 함수를 지원.
     a_table(index).EXISTS, a_table.COUNT, a_table.FIRST, a_table.LAST,
    a_table.PRIOR(index), a_table.NEXT(index),
    a_table.DELETE(start_index,_index), a_table.DELETE.
    5. WHERE CURRENT OF CURSOR를 이용해서 MULTI-TABLE VIEW를 통해
    KEY-PRESERVED TABLE을 UPDATE 가능.
    (5) version 2.0
    ==================
    RDBMS version 7.3에서 부터 makefile 은
    ins_precomp.mk,env_precomp.mk, proc.mk의 3 개로 나뉘었다.
    Ins_precomp.mk 는 기존의 proc.mk 처럼 precompiler executables 를 build
    하기 위한 routine 이고 env_precomp.mk 는 모든 environment 의 변수와
    libraray 를 포함한다.
    이 file 은 Ins_precomp.mk 와 proc.mk 에 포함되어 사용되어진다.
    1. V1.6과 같이 AUTO_CONNECT, CONFIG 옵션 지원. SYSTEM CONFIGURATION
    FILE은 UNIX에서는 $ORACLE_HOME/proc/pmscfg.h 이고 VMS에서는
    ora_proc20:pmscfg.cfg
    2. V1.6과 같이 SQLSTATE 변수와 SQLGLS 함수가 제공된다.
    3. C PREPROCESSOR가 포함되어서 #define이 EMBEDDED SQL과 함께 이용될 수
    있고 #include 로 PRO*C 헤더화일을 INCLUDE 가능.
    4. 구조체를 HOST 변수로 사용 가능. 이것은 SELECT INTO, FETCH INTO 
    또는 INSERT시 VALUES 절에 사용될 수 있으나 PL/SQL PROCEDURE에 PL/SQL
    RECORD ARGUMENT로 사용할 수는 없음. 구조체 내에 또다른 구조체를 포함할
    수는 없지만 ARRAY는 포함할 수 있음.
    5. HOST 변수를 BEGIN/END DECLARE SECTION 안에 넣을 필요가 없음.
    6. V1.6에서 처럼 SELECT LIST에 STORED FUNCTION의 사용이 가능.
    7. SQLCHECK=FULL/SEMANTOCS를 사용하지 않는 경우 FROM 절에 SUBQUERY를
    쓸 수 있음.
    8. CHARACTER 변수의 BIND TYPE은 MODE 옵션이 아니라 DBMS 옵션에 따라서
    결정됨. DBMS=V6/V6_CHAR 인 경우, CHARACTER는 TYPE 1, DBMS=V7(또는
    NATIVE이고 ORACLE7에 접속할 때) 에서는 TYPE 97.
    9. DBMS=V6_CHAR 는 CHARACTER 변수가 가변 길이 문자열로 다루어질 수
    있도록 함.
    10. SQLVCP 함수는 VARCHAR ARR 변수를 지정한 길이로 만들어 주므로
    VARCHAR를 동적으로 할당할 때 COMPILER가 BYTE ALIGNMENT를 가능하게 함.
    11. PRO*C의 PARSE LEVEL을 설정하는 PARSE 옵션.
    a) NONE - PRO*C V1과 같음(HOST 변수를 DECLARE SECTION에 넣어야 함.
    #define 인식 안함 등)
    b) PARTIAL - HOST 변수를 DECLARE SECTION에 넣어야 함
    c) FULL - PRO*C V2의 기능 모두 지원
    12. EXEC SQL WHENEVER ... DO 함수명(args,...); 와 같이 함수호출시UMENT를
    주고 받을 수 있음.
    13. #ifdef/#ifndef 와 EXEC ORACLE IFDEF/IFNDEF 에서 사용하기 위한
    DEFINE 옵션 지원.
    (6) version 2.1
    ================
    1. PRO*C V1.7에서와 같이 char와 IMPLICIT VARCHAR (VARCHAR=YES 옵션과
    함께 적절한 C 구조체로 선언된 변수) HOST 변수에서 MULTI-BYTE NLS
    CHARACTER 데이타와 MULTI-BYTE 문자열을 지원.
     NLS_CHAR=var1,var2,... 옵션으로 MULTI-BYTE HOST 변수를 지정함.
    MULTI-BYTE 리터럴은 다음과 같이 사용된다.
     EXEC SQL SELECT ... WHERE ENAME = N*이경구*;
     단, 이것은 SQLLIB RUNTIME LIBRARY를 통해서 지원되기 때문에 MULTI-BYTE
    NLS 문자열은 DYNAMIC SQL에서 사용될 수 없음. NCHAR 데이타타입은 DDL 과
    함께 사용될 수 없음.
    2. PRO*C V1.7과 같이 NLS_LOCAL 옵션 지원
    3. DEF_SQLCODE=YES 로 설정하면 PRO*C는 다음 문장을 생성한다.
     #define SQLCODE sqlca.sqlcode
     SQLCA는 반드시 INCLUDE 되어야 하며 SQLCODE 변수는 선언되어서는 안됨.
    4. PRO*C V1.7 과 같이 CURSOR VARIABLE 지원.
    5. VARCHAR=YES 로 설정하면 특정한 구조체를 VARCHAR로 인식할 수 있다. 
    구조체의 형태를 보면
     struct
     short len;
     char arr[n];
     } host_var;
    6. CODE=CPP 로 설정하면 SQLLIB 함수 원형(PROTOTYPE)은 다음과 같이
    extern "C" 형식으로 생성됨.
     extern "C" {
     void sqlora( unsigned long *, void *);
     그리고 "//" 와 같은 COMMENT 처리명령을 인식함. 단, CODE=CPP인 경우
    PARSE 는 자동적으로 PARTIAL로 설정됨.
     CPP_SUFFIX 옵션은 PRECOMPILE된 화일의 확장자를 지정.
    SYS_INCLUDE=(dir1,dir2,...) 옵션은 C 헤더 화일과 다른 위치에 있는 C++
    헤더 화일이 있는 디렉토리를 지정. 이 옵션은 PARSE 옵션이 NONE이 아닌
    경우에만 필요하다. HEADER 화일을 찾는 위치는 SYS_INCLUDE, 현재 디렉토리,
    표준 SYSTEM 디렉토리(UNIX에서 PRO*C 헤더 화일의 위치는
    $ORACLE_HOME/sqllib/public), 그리고 INCLUDE 옵션에 지정된 디렉토리이다.

  • SQL Server Max Memory Settings

    Hi,
    I'd like to check if SQL Server will consume memory more than the configured MAX Memory settings? And if so when does SQL consume that and how much would it consume.
    Regards,
    Jay

    Hi,
    I'd like to check if SQL Server will consume memory more than the configured MAX Memory settings? And if so when does SQL consume that and how much would it consume.
    Hi
    Can you please tell us what is version and edition of SQL Server here. If it is 2012 its little difficult to reporduce your scenario where SQL Server 2012 will take more than max server memory setting because lots of features which use to take memory
    outside buffer pool before SQL 2012 are now changed to take memory from buffer pool. Also quite lot depends on whether system is 32 bit or 64 bit
    For SQL Server versions below 2012(not SS2000) you might get lucky with following (taken from
    Here)
    1. COM Objects
    2. SQL Server CLR
    3. Memory allocated by Linked Server OLEDB Providers and third party DLL’s loaded in SQL Server process
    4. Extended Stored Procedures:
    5. Network Packets
    6. Memory consumed by memory managers. If the memory request is greater than 8 KB and needs contiguous allocation. 
    7. Backup
    If you heavily use above features you might see SQL Server memory utilization crossing above max server memory setting. Of all above SQLCLR and extended stored procs would be my bet. If you use them heavily you might see what you want to. Extended
    stored proc has performance issues so use it on your own risk. Use below query to check SQL server memory utilization( works from SS 2008 and above)
    select
    (physical_memory_in_use_kb/1024)Memory_usedby_Sqlserver_MB,
    (locked_page_allocations_kb/1024 )Locked_pages_used_Sqlserver_MB,
    (total_virtual_address_space_kb/1024 )Total_VAS_in_MB,
    process_physical_memory_low,
    process_virtual_memory_low
    from sys. dm_os_process_memory
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

Maybe you are looking for

  • WAN IP not available, how to setup Linksys as a router

    Hi, I have a WRT100 and a WRT54G. Our ISP does not give us the WAN IP. So all i have is the 192.168.1.1 IP on my network. We have ADSL. So the gateway is 192.168.1.1. How do I setup my router with DHCP to use 192.168.1.1 as my gateway? If i configure

  • Using of abap predifined screens in views

    Hi, I tried to insert abap screens( predifined  and designed me) in webdynpro abap views but these screens are not visible after insertion complete but context part visible as per screen elements, if i try to save got message like 'MAIN was not chang

  • Adding Alternative Audio Formats to Website

    Am currently constructing a website through Dreamweaver that is to demonstrate new, standard and alternative internet media audio formats including, to mention a few: Ogg Vorbis, Windows Media, iTunes, MP3/MP4, Real Audio, etc. I am really new to thi

  • How to disable mail inline attachments yosemite

    Since installing Yosemite I have customers unable to download pdf attachments sent to them with Mac Mail. I purchased Attachment Tamer some time ago but it isn't yet supported for Yosemite and given the time taken I suspect it may not be updated. I b

  • Cant get past the login after update fail? (OSX 10.8.3)

    Hi! I have a big problem! This morning i tried to update my mac to the lastest version (10.8.3). Somthing made it to fail and i hade to reboot the system. Now the systems starts as before but when i type in my password and press enter, the screen fla