I have inherited a Pro*C codebase. The programs mostly function as reports, so I am working on migrating the queries to a modern reporting tool. However, I would like to explore the existing Pro*C files/programs. To do so, I would like to be able to run and perhaps even debug the programs, not just read the source code.
Researching the options, a lot of resources are quite old/outdated or unfamiliar to me. I am new to Oracle in general (I’ve only ever programmed before on the Microsoft technology stack). Also, I’ve never done much of anything in C, either (other than tutorials).
My OS is Windows 11. I have VS 22 installed, along with the C/C++ desktop workload. I do NOT have an Oracle database instance installed on my machine, but I have the info to connect to one remotely. I have installed some Oracle client software (e.g. drivers) to connect to the Oracle database through SSRS, for instance.
My question is, is it possible to set up my environment to pre-compile Pro*C to C, and ultimately successfully run (and perhaps debug) a Pro*C source file?
(I’ll note that I have already explored the option of just running/debugging these Pro*C programs on the Linux machine where the Oracle database is installed… but I specifically want to be able to run these on my own machine (a development environment). I don’t want to have to go to the Prod machine to run through these programs, if I can avoid it.)
Here are the resources I’ve consulted and comments on these resources:
-
Precompiler Concepts – Compile and Link – contains no links or further directions for a Windows system
-
Tutorial-01Connecting to Oracle Database in C(PRO*C) – I do not have the “Resource” files indicated around 1:30
-
Oracle Instant Client and Oracle Instant Client Precompiler Downloads – as mentioned above, I previously installed ODAC with Oracle Developer Tools for Visual Studio – OUI (18.3) for making “Oracle for OLE DB” connections through SSRS (this is a 32-bit driver). But the immensity of the options on this download site are confusing. I honestly don’t even know why the one I picked for SSRS ended up working. I mentioned my system details. I can say that the database I want to connect to is Oracle 12c.
-
The Precompiler Command and Pro*C/C++ Precompiler Issues for Windows Platforms – this seemingly newer documentation is a bit more helpful than the other (older) documentation I looked at, but it doesn’t give much detail on which client download / driver to install to even make the precompiler available.
-
How can I call a PRO*C program directly from PL/SQL? – this related to running a Pro*C program from a PL/SQL program. I want to run/debug a Pro*C program independently.
-
Unable to compile Pro*c code in linux – relevant to Linux, not Windows.
I am going to try out various options in an isolated environment (to keep my base machine clean) but I would appreciate any guidance or direction on how to proceed.