How to compile and run a Pro * C under Unix program?

Hello gurus,

I'm new to the Pro * C. I just wrote a sample Pro * C program 'first.pc' to read some information in tables and print it on the screen.
I do not know how to compile and run to see the release of my first program.

After searching a lot, I tried following...
-- Step 1 compile the program into .c program
 
$->ls -lrt first.pc
-rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
$->proc first.pc
 
Pro*C/C++: Release 8.1.7.0.0 - Production on Sat Oct 31 05:43:35 2009
 
(c) Copyright 2000 Oracle Corporation.  All rights reserved.
 
System default option values taken from: /oracle/app/oracle/product/8.1.7/precomp/admin/pcscfg.cfg
 
$->ls -lrt first*
-rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
-rw-r--r--    1 sqloper4 staff             0 Oct 31 05:43 first.lis
-rw-r--r--    1 sqloper4 staff          6648 Oct 31 05:43 first.c
 
$->
 
-- Step 2 Generate the .o file
 
$->cc -I${ORACLE_HOME}/precomp/public -c first.c
first.c: In function 'main':
first.c:154: warning: return type of 'main' is not 'int'
 
$->
 
$->ls -lrt first*
-rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
-rw-r--r--    1 sqloper4 staff             0 Oct 31 05:43 first.lis
-rw-r--r--    1 sqloper4 staff          6648 Oct 31 05:43 first.c
-rw-r--r--    1 sqloper4 staff          3709 Oct 31 05:45 first.o
 
$->
 
-- Step 3 After that link the .o to libraries and produce the exe
 
$->cc -o exe_name -L $ORACLE_HOME/lib -lclntsh
ld: 0711-317 ERROR: Undefined symbol: .main
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
 
$->
 
$->ls -lrt first*
-rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
-rw-r--r--    1 sqloper4 staff             0 Oct 31 05:43 first.lis
-rw-r--r--    1 sqloper4 staff          6648 Oct 31 05:43 first.c
-rw-r--r--    1 sqloper4 staff          3709 Oct 31 05:45 first.o
$->
I also tried steps below after some time thanks to the new program
$->ls -lrt first*
-rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
$->
$->proc first.pc

Pro*C/C++: Release 8.1.7.0.0 - Production on Tue Nov 3 05:42:14 2009

(c) Copyright 2000 Oracle Corporation.  All rights reserved.

System default option values taken from: /oracle/app/oracle/product/8.1.7/precomp/admin/pcscfg.cfg

$->cc first.c
first.c:142:19: error: sqlca.h: A file or directory in the path name does not exist.
first.c: In function 'main':
first.c:170: error: 'sqlca' undeclared (first use in this function)
first.c:170: error: (Each undeclared identifier is reported only once
first.c:170: error: for each function it appears in.)
first.c:154: warning: return type of 'main' is not 'int'
first.c: In function 'sqlerror':
first.c:260: error: 'sqlca' undeclared (first use in this function)
$->
Can someone help me on above errors?

After all, above yet I don't know how to proceed and "run" the program.
Could you please help me with the steps 'Compile and run' a Pro * C program?

Oracle DB Version: Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
OS: Unix


Thanks in advance!

Published by: Learning.Oracle on November 3, 2009 17:13

Hello

-lsql10

Which specifies the library to version 10, but it seems that you have your first assignment 8.1.7.

You will need to look in your lib directory and see what we call the file in 8.1.7 - it's been too long and I don't remember the exact name.

Kind regards

Mark

Tags: Database

Similar Questions

  • help on how to compile and run the awt programs

    any1 can tell how to compile and run the awt programs

    Published by: 863765 on July 18, 2011 03:29

    The same way you compile and run any other Java program.

  • How install and run Acrobat Pro after having downloaded the trial without checking 'install '?

    How install and run Acrobat Pro after having downloaded the trial without checking 'install '?

    You can not.  You must check 'install' to install and run it.

  • How to compile and install the kernel modules after nation and nipalk for installation of Gentoo 64 bit?

    We are trying to install a PCIe 6251 DAQ card in a box of Gentoo 64 bit running Linux kernel 2.6.28 - gentoo-r5 4.3.2 - gcc and glibc - 2.8.  We have installed RPM utilities to manage the installation.  The current problem is that we are not able to compile and install the kernel modules: nidmxfk, nimsdrk, nimstsk and nipxirmk.  Here's a summary of what we have done so far, and to what extent we got.

    First of all, we have changed the configuration of the kernel that we could export the init_mm unused symbol by changing the configuration option of the CONFIG_UNUSED_SYMBOLS = o kernel and recompile the kernel.  Then we installed LabView 8.6.1.  Then we ran the nation 1.9 installer who has installed the source code in vain on the compilation.  To resolve this problem, we have changed the function of pte_offset to pte_offset_kernel by editing the file/usr/local/natinst/nation/configures following the instructions here:

    http://decibel.NI.com/content/docs/doc-4511

    We were then able to compile and install the kernel nation module thanks to:

    . / configure
    do
    make install

    lsmod said that nation has been properly installed.  Then we ran the installer for DAQmx 8.0.1 by:

    . / INSTALL - nodeps

    To do this, we have received errors indicating that LabView support could not be installed because check addictive (incorrectly we think) stated that labviewbase86 has not been installed; This caused the installer to have an abortion.  Therefore, we refused to install support for LabView 8.6 and revived the installation program which produces the output:

    Installation of the driver NOR-DAQmx Distribution of Linux Installer version 8.0.1f0...

    Already to jump Edward - 1.9.0 - f0.noarch.rpm installation, same or newer
    installed.

    Pre Installation...

    Preparing... ########################################### [100%]
    1:nitimingi ########################################### [ 4%]
    2:nipalki ########################################### [ 7%]
    3:nipali ########################################### [ 11%]
    RC0.d directory not found, startup script is not accredited with init levels.
    4:labview80 - rte # [14%]
    5:ni653x ########################################### [ 18%]
    6:nicdigi ########################################### [ 21%]
    7:nidaqmxcapiexmp # [25%]
    8:nidaqmxcapihelp # [29%]
    9:nidaqmxcapii # [32%]
    LN: create the symbolic link ' / usr/local/include/NIDAQmx.h': no such file or directory
    10:nidaqmxcfgi # [36%]
    11:nidaqmxef # [39%]
    12:nidaqmxhelp # [43%]
    13:nidaqmxinfi # [46%]
    14:nidaqmxswitch # [50%]
    15:nidimi ########################################### [ 54%]
    16:nidsai ########################################### [ 57%]
    17:nimdbgi ########################################### [ 61%]
    18:nimioi ########################################### [ 64%]
    19:nimru2i ########################################### [ 68%]
    20:nimxdfi ########################################### [ 71%]
    21:nimxpi ########################################### [ 75%]
    22:nimxs ########################################### [ 79%]
    RC0.d directory not found, startup script is not accredited with init levels.
    23:niorbi ########################################### [ 82%]
    24:nipxirmi ########################################### [ 86%]
    25:nirpci ########################################### [ 89%]
    26:niscarabmm # [93%]
    27:niscxi ########################################### [ 96%]
    28:nistci ########################################### [100%]

    After Installation...

    At this point, after reading this report, we used the Gentoo rc update utility to add several scripts for the boot runlevel initialisation:

    update of RC - a boot nipple
    update of RC - a bunch of nipxirmu
    update of RC - a bunch of mxssvr
    update of RC - a bunch of nisvcloc
    update of RC - a bunch of nidevldu

    When the computer reboots, you get an error message indicating that the following kernel modules are not: nidmxfk, nimsdrk, nimstsk and nipxirmk.  lsmod shows that the nation and nipalk are installed, but no other kernel modules NOR are present.  modprobe-l shows that only nation and nipalk are available.

    So we have several questions:

    1. we install drivers in the correct order?  Should use us NI-VISA 4.5 or NOR-488. 2 rather than DAQmx 8.0.1?

    2. What kernel modules should be loaded for this equipment run?  How to compile and install the ones that we have yet, specifically nidmxfk, nimsdrk, nimstsk and nipxirmk?  Are there others?

    3. How can we get the installer to properly recognize that we have installed LabView Core and install support for LabView?  Are there additional kernel modules related to the support of LabView?

    4. What is the symbolic link that was not created in the DAQmx installation report? (ln: create the symbolic link ' / usr/local/include/NIDAQmx.h': no such file or directory)?

    I apologize for so many questions, but these seem to be the last obstacles to obtaining OR runs correctly on this system.  Is there other information that we can provide that would be useful?  Thanks for any help or suggestions you can offer.

    Craig

    Hey Craig,.

    Given that you use 64-bit Linux all kernel modules must be compiled for 64 - bit.  User mode binaries can be 32-bit, assuming that you have installed the 32-bit support libraries.

    NOR-DAQmx is a complex architecture and requires several kernel modules to support your PCIe card.  Most of these kernel modules have not been brought to support 64-bit Linux.  Some kernel modules are components infrustructure that are shared with other pilots OR as NI-VISA and NOR-488. 2 and have been brought to support 64-bit Linux.  Unfortunately, you need all the modules to use your hardware.

    I hope that answers your question.

    Shawn Bohrer

    National Instruments

  • How to install and run windows on my macbookair?

    How to install and run windows on my macbookair?

    Hello

    I suggest you to follow the links and check out them.

    http://www.Apple.com/support/Bootcamp/

    http://support.Apple.com/kb/HT3986

    http://support.Apple.com/kb/HT1899

    Boot Camp Installation & Setup Guide

    http://manuals.info.Apple.com/en/Boot_Camp_Install-Setup_10.6.PDF

  • How to: Download and run the utility of Diagnostic equipment of HP (HDU)

    Hi all

    The video below will show you how to download and run the hardware HP (HDU) diagnostic utility in Windows 7 and Windows Vista (and probably 8 as well). You don't want to use this tool to help you determine if hardware of your printer HP working properly.

    If you have any problems, or simply have questions about the tool, response in this thread.

  • I am running Acrobat Pro DC under MacOsSierra and when I want to scan a dokument I can´t choose the option request to the digitization of additional pages. Why?

    I am running Acrobat Pro DC under MacOsSierra and when I want to scan a dokument I can´t choose the option request to the digitization of additional pages. Why?

    Lars Andrae

    If I'm not mistaken you use ICA scanner. This 'Still Prompt pages' option is not available for ICA scans from now. But we are working on that, and will soon be available. I'll put you once its available.

    For now please try the TWAIN driver.

    Thank you.

  • Impossible to compile and run the project

    Hello

    Last night, my project ran and deployed to the alpha of dev without problem.

    This morning (and the only thing I've done is changed my icon and splash screen) it just sits there at 91%. When you look at the progress window there are two progress bars:

    1 says Syncing and application startup

    2 said launch myapp (blocked: user operation is pending of "" to complete).

    This eventually give up and display a dialog window:

    There is problem

    Synchronization and application startup

    Deployment failed: Info: request shipment: install and launch

    News: Native on debugging

    Information: size of the 648916759 file

    Info: installation

    Info: Treatment 648916759 bytes

    News: Progress 0%...

    News: Advance 4%...

    Info: 99% progress

    actual_id:

    actual_version:

    result: failure 812/var/tmp/cgic247239: duplicate member name ' native/MyAppName '.

    It's that last line that concerns me.

    Any ideas what is happening?  My other projects compile and deployment very well.  I tried to use the device-debug and release.  I rebooted the PC and dev alpha and even delete the running configs so that they recreated

    Thank you very much

    After more digging, I came across http://supportforums.blackberry.com/t5/Cascades-Development/App-Wont-Launch/m-p/1955639/highlight/tr...

    I also tried to create a new project, but the problem persisted. But what it show me was a warning in the bar file descripter.  The assets he suggested I had a duplicate png file.  The assets tab listed my assets folder (where the image was in fact), but it was also alongside icon.png.  So I removed that in the list and hey presto - all is well again.

  • How to build and run the sample extensions?

    I have a good time trying to get the sample to run, extensions

    Adobe-CEP/CEP-Resources · GitHub or also in the SDK of 2014 Adobe Illustrator CC for the Plugins that have a graphical interface.

    So far I've failed.

    Windows 7 x 64 system. Illustrator CC

    First test:

    Assemble one of the samples using the Adobe package manager. Added the file of "CEP_HTML_Test_Extension" or well the 'TutorialUI' of the SDK samples.

    and then install the zxp file obtained by using the "extensions Manager". No error reported. Extension handlers lists the Extension as being active for AI CC. Illustrator began.

    But I don't see anything in illustrator. There's no "Extensions" entry in the menu of Windows of Illustrator.

    The PlugIn tutorial menus are displayed, but the sample dialog box does not appear. In the debugger, I noticed that the call to pFnLoadExtension fails.

    Second test:

    After the pdf file "USING the kit SDK ADOBE EXTENSION" (http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/creativesuite/pdfs/CC14_Extension_S DK.pdf)

    Package as before

    PlayerDebugMode enabled in HKEY_CURRENT_USER\Software\Adobe\CSXS.5

    copied the zxp file in C:\Program Files\Common Files\Adobe\CEP\extensions

    Same result. I don't need an extension.

    I had no problem, build and run the sample Plugins well.

    What I am doing wrong?

    How can I build and run a simple example of extension?

    Any help appreciated.

    The problem related to how the samples were copied in the extensions directory. When you .zxp files you need to extract the content and place them in the extensions directory.

    For example this:

    C:\Program Files (x 86) \Common Files\Adobe\CEP\extensions\

    TutorialUI.zxp

    UIShowcase_sample.zxp

    But this:

    C:\Program Files (x 86) \Common Files\Adobe\CEP\extensions\

    TutorialUI\

    UIShowcase_sample\

    You can install the .zxp by the Manager of extensions or, for development purposes, rename the .zip file type.

  • How to compile and test the SIM card applet

    Hi all
    I have a sample applet:
    package sim.access.sample;
    
    import sim.access.*;
    
    public final class helloFile extends Applet implements ToolkitInterface
    {
           private static SIMView  theGsmApplet;
           private static USIMView aUsimApplet;
           private static AID theGSMAppletAID;
           private static AID theUSIMAppletAID;
           
           private static final byte[]  baGSMAID = {(byte)0xA0,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x09,(byte)0x00,(byte)0x01};
           
           protected helloFile(){
           
    
           public MyApplet () {
                theGSMAppletAID = new AID();
                // get a reference to the GSM interface
                theGsmApplet = SIMSystem.getTheSIMView(theGSMAppletAID);
           }
           
           
           public void doSomethingWithAFile(){
                
                   // returns the SIMView of the currently selected Applet 
                   // allows to implement services that are depend on specific 
                   // file in GSM or USIM application as well as to implement 
                   // technolgie independent applets.
                   SIMView theView = SIMSystem.getTheSIMView();
                   if(theView instanceof SIMView){
                        // do something with a GSM file
                   }
                   else if(theView instanceof USIMView) {
                        //do something with a USIM specific file
                   }
                   
                   // Or request a View to a specific application
                   USIMView theView = SIMSystem.getTheSIMView(aUSIMAppletAID);
           }
    
    }
    I want to compile and test, how can I do?

    Muhammad Umer wrote:

    safarmer wrote:
    You need the EXP files to be on the road to construction. This can be in the form of a POT that has a record of javacard under each package with the EXP file.

    I downloaded the package, but I wonder that, on compiling EXP file is automatically generated in the class path in the bin folder. But the I downloaded the package contains java card folder and EXP files inside of them, where should I put these files?

    JCOP generate EXP files for source code compiled for you. If you have it in a jar on your way of construction, then they are not replaced. I managed to unpack the java files and EXP files in the ZIP file of 3GPP. When combined into a single JAR file (with each package having a javacard subfolder) JCOP tools recognizes files and is able to use to build my project. All the necessary files are in the ZIP of the Web site.

    See you soon,.
    Shane

  • How to push and run an exe via Forms 11 g 2

    Hi, wonder if anyone can help me in this, I use Oracle Forms 11 g 2 and reports on OS Oracle linux 6.3 (64 it).

    Our dev team needs to push and run an exe on the client computer (this exe do some printing and setting function formatting on the client). Exe needs to be pushed Forms client server (print server)

    Thanks and greetings

    Hello

    you will most likely use the webutil.pll that comes with the installation of forms & reports (% FORMS_HOME%/forms). You will find a package as 'Webutil_file_transfer' and a 'AS_To_Client' function With this function you can easily transfer files from the application server for the client. If you want to have a progress bar is displayed, use 'AS_To_Client_With_Progress '. Subsequently, you can run the *.exe with a client_host command, also the webutil library.

    I hope that helps you.

    Best regards

    Daniel

  • How to fix and run windows defender

    How to resolve this error message

    When I start my laptop I get an error message when the windows open which says
    "could not run or load C:\Users\user\AppData\Local\Temp\192D0D05C23F0D9D0658.

    Also my windows defender does not work, I tried winmgmt/repository too.

    I have the windows vista operating system

    Hello

    Your first mistake may be malicious associates.

    Download, install, update and scan your system with the free version of Malwarebytes AntiMalware:

    http://www.Malwarebytes.org/products/malwarebytes_free

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    If the problem persists after scanning, take these startup entries:

    "How to use MSCONFIG in Windows Vista"

    http://www.netsquirrel.com/Msconfig/msconfig_vista.html

    You can also use this free program to do, too:

    "Autoruns for Windows V11.32"

    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902.aspx

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    Subject of Defender:

    If you use Norton, AVG, Avira, Microsoft Security Essentials, McAfee, etc. the default action is for Windows Defender must be disabled, that these AntiVirus programs have their own Antispyware Applications.

    There is nothing to worry.

    Using both programs at the same time can cause system conflicts, etc.

    If you are using one of the above AntiVirus programs, this Information from David O - Support Engineer shows you how to manually enable Windows Defender (disregard information from uninstalling; not possible in Vista):

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-security/how-do-i-manually-start-Windows-Defender-in-Vista/dab845b2-9ba5-47F3-9518-c4c6781e7d5b

    "Go to start, Control Panel, Administrative Tools, Services. Look for Windows Defender.

    Right click and select Properties , ensure that Startup Type is automatic.

    Once modified, click apply and OK.

    Quit and restart your computer. Check the back take the same path to confirm that Windows Defender has started"

    .

    If you want to have additional protection against malware using the version FREE of Malwarebytes AntiMalware:

    http://www.Malwarebytes.org/products/malwarebytes_free

    And for now, change startup Vista programs without using Defender, use one of these methods:

    "How to use MSCONFIG in Windows Vista"

    http://netsquirrel.com/Msconfig/msconfig_vista.html

    Or the program Autoruns for FREE:

    "V11.21 Autoruns for Windows"

    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902

    See you soon.

  • Any 1 can show or learn how to optimize and run faster my WRT160N

    Hi there pipol any1 can show how to optimize my router WRT160N run faster? my firmware downgrade already to build 8. also my setting is WPA2. I had only to the laptop connected to this wireless router, 1 is N and another G. sometimes I feel my connection is slow, and also each time I visit this site my connection linksys was teeming I have not now why? but the other site I do not feel one. Thanks in advance for help.

    Try to make the settings wireless advanced as change the beacon interval = 50, Ahmed Frag = 2306, Ahmed Rts = 2307 & then also reduce the MTU size to 1365 in order to increase the speed on the pc.

  • How to install and run a 2nd monitor

    How to fix, install, or run a 2nd monitor of my laptop? Windows Vista

    Hello

    Do not forget to check with your system manufacturer, the documentation online and the drivers and their
    Forums (if any).

    Your laptop should have a video which will allow to another monitor be hung and more
    the built in LCD. You then decide if you want that the monitors to display different
    programs or be used as a large screen where you can move programs from one screen
    to the other.

    Of course your system, a video camera and its drivers have to support with a 2nd monitor.

    Two screens are better than one
    http://www.Microsoft.com/athome/organization/twomonitors.aspx

    Work and play better with multiple monitors
    http://Windows.Microsoft.com/en-us/Windows7/work-and-play-better-with-multiple-monitors

    Move windows between multiple monitors
    http://Windows.Microsoft.com/en-us/Windows7/move-Windows-between-multiple-monitors

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • My beta1 application does not open when compiled and run with the beta 2

    I somehow updated my alpha and IDE, now my only problem is that when I launch my app it begins to open on the alpha but omits to say could not load library libbb.so.0, I'll do some research, but if anyone has any ideas?

    Thank you as always.

    I also had problems during the upgrade to version BETA 2.

    My application will compile fine but when run in the Simulator, it would break indicating: 'CODE of ERROR 8 '.

    What I have done is to create a new application of Cascades and simply copied over the old files in my new project (with a change of name here and there).

    This fixed the problem.

Maybe you are looking for

  • Help of the Apple ID

    I changed my apple ID but has not signed my iPhone and iPad first.  My devices still recognize the old apple id which I thought would change when I changed my id in the first place.  When I go to forgot/appleid.com he says that my old id is not an ID

  • Impossible to get a recovery key

    Hi, I just reinstalled Firefox on my smartphone, trying to sync it with my office, but without success. She asks me the recovery key, but I don't have it. Tried troubleshooting on Web site of Firefox, but it does not help. Help, please!

  • I am trying to open iTunes and nothing happens.

    I have a new HP laptop with Windows 10. I click on the desktop icon and nothing happens. Nada. It worked fine two days ago.

  • OfficeJet Pro 8600 loses the wireless connection

    I have a 8600 OfficeJet Pro (n911a), which has lost its connection with the PC. The computer is running Windows 7 (64) and work very well for several months. Recently, when you try to print, the following message is displayed. I did several searches

  • How to make a live chat via windows messenger live

    How to video chat live with windows live messenger