Need help in compile and link Pro*C simple program

From: <ikhnaton2_at_gmail.com>
Date: 18 Mar 2006 12:31:49 -0800
Message-ID: <1142713909.932005.242770_at_v46g2000cwv.googlegroups.com>



[Quoted] I'm new to Pro*C. I had made a simple program (test.pc) to begin programming with Pro*C. My program is as follows:

#include <stdio.h>
#include <stdlib.h>
#include

"/oracle/oracle/app/oracle/product/8.1.7/precomp/public/sqlca.h"

void main()
{

        char * uid = "/";
        int a;

    EXEC SQL CONNECT :uid;

    EXEC SQL SELECT count(id) INTO :a

             FROM tab
             WHERE status=4;

    printf("The number of rows is: %d\n", a);     exit(0);
}

I compiled from Pro*C to C without any problem using the following command:
$ proc test.pc

Now, I need to compile from C:
I copied demo_proc.mk from $ORACLE_HOME/precomp/demo/proc and just change the line with environment variable SAMPLES to put my program name: test. It looks like:

SAMPLE=test

After I execute the make command as follows: make -f demo_proc.mk

I just got this line with no output:
`/oracle/oracle/app/oracle/product/8.1.7/lib/libclntsh.sl' is up to date.

Could anyone help me to compile my first file.

My environment:
Machine: HP-UX B.11.11 U 9000/800
Pro*C/C++: Release 8.1.7.0.0
C compiler provided by HP-UX: cc

Thanks in Advance, Received on Sat Mar 18 2006 - 21:31:49 CET

Original text of this message