Using Pro*C/C++ Precompiler at the Engineering Network Services

  1. Make sure your Oracle environment is set correctly, i.e. you can connect to Oracle database via SQL*Plus.

  2. Setup your environment: Run user-setup and select
  3. Write a Pro*C/C++ program (e.g. myproc.pc). Be sure to put exit(0) at the end of your program. Otherwise, the program would not exit.


  4. Don't forget to commit your database if it has been updated.


  5. Copy a make file /opt/oracle8/product/8.1.5/precomp/demo/proc/demo_proc.mk into the directory where your Pro*C/C++ program is. You can also copy sample files provided by Oracle from the same directory, and compile and link them.

  6. Compile your program:
      >make -f demo_proc.mk build EXE=myproc OBJS=myproc.o
  7. If everything goes well, an executable myproc will be created.