SV: Simple (probably) PRO*C setup question

From: (wrong string) öström <lasse.sjostrom_at_telia.com>
Date: 2000/07/17
Message-ID: <V4Lc5.628$967.194072064_at_newsb.telia.net>#1/1


The proc-command is a preprocessor translating your stuff to C-code, which itself should be compiled by a C-compiler.

The make-command did all that for you in Unix-manner. The proc-command just do part of the job. You should do all three steps.

proc - producing C-code.
[Quoted] CC, or whatever to produce linkable C-object code. Link the stuff with proper libraries to make the exe-file.

[Quoted] Depending on operating system there are different ways to get the goal.

Lars

please help <slow_at_cable.com> skrev i
diskussionsgruppsmeddelandet:1EFc5.2830$Mt6.6748_at_newsfeed.slurp.net...
> After saving the code, I used the command "proc test.c test2.exe" to try
 to
> compile it. This may be where my problem is. At my previous job, we had
 to
> type "make -f makefile.mk <progname>" to compile. Its just been too long
> for me to remember much of anything about compiling pro*c, so I went with
> the basic method of compiling.
>
> Thanks for helping me out on this.
>
> Ron Watson
>
> rwatson_at_kemron-lab<takethisout>.com
>
>
> "Cheeseless In Cheddar" <nhhdc_at_my-deja.com> wrote in message
> news:8kv5or$pj4$1_at_nnrp1.deja.com...
> > First thoughts ... did you pre-compile with 'proc' or whatever on your
> > system, and how did you link it?
> >
> >
> >
> > In article <DnDc5.2775$Mt6.7520_at_newsfeed.slurp.net>,
> > "please help" <slow_at_cable.com> wrote:
> > > Hello.
> > >
> > > Three years ago, I used PRO*C a great deal at my previous job. I'd
 like to
> > > start using it at my current job, but I'm having trouble getting it
 setup
> > > correctly in our system. To get the syntax to slowly come back to
 me, I
> > > started out with the "hello world" program, complied it, and it
 worked fine.
> > > Next, I added an Oracle variable declaration. Here is the code:
> > >
> > > #include <stdio.h>
> > > #include <string.h>
> > > #include <ctype.h>
> > >
> > > EXEC SQL INCLUDE /oracle/product/7.3.4/precomp/public/sqlca.h;
> > > EXEC SQL INCLUDE /oracle/product/7.3.4/precomp/public/oraca.h;
> > >
> > > /*
> > > EXEC SQL BEGIN DECLARE SECTION;
> > > varchar cid[5];
> > > EXEC SQL END DECLARE SECTION;
> > > */
> > >
> > > main()
> > > {
> > > printf ("hello world\n");
> > > }
> > >
> > > This compiled fine, but when I ran it, I got the following output:
> > >
> > > test.exe[2]: /1000: cannot execute
> > > test.exe[5]: struct: not found
> > > test.exe[7]: unsigned: not found
> > > test.exe[8]: void: not found
> > > test.exe[9]: void: not found
> > > test.exe[10]: unsigned: not found
> > > test.exe[12]: typedef: not found
> > > test.exe[13]: typedef: not found
> > > test.exe[16]: /1000: cannot execute
> > > test.exe[17]: typedef: not found
> > > test.exe[18]: typedef: not found
> > > test.exe[20]: /1000: cannot execute
> > > test.exe[20]: Package: not found
> > > test.exe[21]: struct: not found
> > > test.exe[23]: unsigned: not found
> > > test.exe[24]: char: not found
> > > test.exe[26]: static: not found
> > > test.exe[28]: 6,: not found
> > > test.exe[29]: test.c: cannot execute
> > > test.exe[33]: static: not found
> > > test.exe[36]: static: not found
> > > test.exe[37]: unsigned: not found
> > > test.exe[38]: unsigned: not found
> > > test.exe[39]: unsigned: not found
> > > test.exe[40]: unsigned: not found
> > > test.exe[41]: unsigned: not found
> > > test.exe[42]: unsigned: not found
> > > test.exe[43]: unsigned: not found
> > > test.exe[44]: short: not found
> > > test.exe[45]: unsigned: not found
> > > test.exe[46]: char: not found
> > > test.exe[47]: unsigned: not found
> > > test.exe[48]: unsigned: not found
> > > test.exe[49]: short: not found
> > > test.exe[50]: unsigned: not found
> > > test.exe[51]: unsigned: not found
> > > test.exe[52]: unsigned: not found
> > > test.exe[53]: unsigned: not found
> > > test.exe[54]: short: not found
> > > test.exe[55]: unsigned: not found
> > > test.exe[56]: unsigned: not found
> > > test.exe[57]: syntax error at line 57 : `}' unexpected
> > >
> > > It looks like I probably just haven't got something set up correctly,
 but
> > > with no previous experience setting up PRO*C and not being the DBA of
 our
> > > system, I have no idea where to even start looking for the problem.
 Does
> > > anyone have any idea what would cause this type of output?
> > >
> > > Thanks for any help.
> > >
> > > --
> > > Ron Watson
> > > rwatson_at_kemron-lab<takethisout>.com
> > >
> > >
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>
Received on Mon Jul 17 2000 - 00:00:00 CEST

Original text of this message