This is a discussion on Compiling Pro*C Flatten.pc For Spooling within the Oracle Database forums, part of the Database Server Software category; --> Hi, I've got flatten.pc off: asktom.oracle.com/~tkyte which spools a table and I'm trying to compile it. I successfully executed ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I've got flatten.pc off: asktom.oracle.com/~tkyte which spools a table and I'm trying to compile it. I successfully executed proc -iname=flatten flatten.pc and have the resulting '.c' file. Now when I try compile it with: gcc -o flatten flatten.o -m64 -L/oracle/rdbms/9.2.0/orax011/lib -lclntsh -m64 -lclntst9 -m64 + gcc -o flatten flatten.o -m64 -L/oracle/rdbms/9.2.0/orax011/lib -lclntsh -m64 -lclntst9 -m64 ld: fatal: file flatten.o: wrong ELF class: ELFCLASS32 ld: fatal: File processing errors. No output written to flatten collect2: ld returned 1 exit status I can't get out the binary? I've tried to use Tom Kyte's Oracle Pro*C makefile (http://asktom.oracle.com/~tkyte/proc_makefile/) also to no avail. Can anyone give me some pointers or an example make file? |
| |||
| In article <1112741982.663514.248260@o13g2000cwo.googlegroups .com>, absinth says... > >Hi, > >I've got flatten.pc off: what OS what db release? > >asktom.oracle.com/~tkyte > >which spools a table and I'm trying to compile it. > >I successfully executed proc -iname=flatten flatten.pc and have the >resulting '.c' file. Now when I try compile it with: > >gcc -o flatten flatten.o -m64 -L/oracle/rdbms/9.2.0/orax011/lib >-lclntsh -m64 -lclntst9 -m64 > >+ gcc -o flatten flatten.o -m64 -L/oracle/rdbms/9.2.0/orax011/lib >-lclntsh -m64 -lclntst9 -m64 > >ld: fatal: file flatten.o: wrong ELF class: ELFCLASS32 > >ld: fatal: File processing errors. No output written to flatten > >collect2: ld returned 1 exit status > >I can't get out the binary? > > >I've tried to use Tom Kyte's Oracle Pro*C makefile >(http://asktom.oracle.com/~tkyte/proc_makefile/) also to no avail. Can >anyone give me some pointers or an example make file? > -- Thomas Kyte Oracle Public Sector http://asktom.oracle.com/ opinions are my own and may not reflect those of Oracle Corporation |
| |||
| Hi Tom, I have to say asktom is one of the most awesome Oracle resources out there. It's been a godsend at work... 1. Answer to Q1: Solaris 9 Running on a Sun V440 2. Answer to Q2: Connected to: Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.5.0 - Production |
| |||
| absinth wrote: > Hi, > > I've got flatten.pc off: > > asktom.oracle.com/~tkyte > > which spools a table and I'm trying to compile it. > > I successfully executed proc -iname=flatten flatten.pc and have the > resulting '.c' file. Now when I try compile it with: Where is the compilation command line (gcc -c ...). The following line is the link command. > gcc -o flatten flatten.o -m64 -L/oracle/rdbms/9.2.0/orax011/lib > -lclntsh -m64 -lclntst9 -m64 > > + gcc -o flatten flatten.o -m64 -L/oracle/rdbms/9.2.0/orax011/lib > -lclntsh -m64 -lclntst9 -m64 > > ld: fatal: file flatten.o: wrong ELF class: ELFCLASS32 > You have to use -m64 also for the compilation step so that you get a 64bit object file flatten.o or compile and link in 32bit mode by avoiding the m64 switch and use $ORACLE_HOME/lib32 as lib dir. |