How to compile version independent OCI program?
Hi,
I am trying to compile my C++ application on linux which uses oci library. I have installed oracle 11g on my system.
My make file looks like this -
[SKIP]
ifeq ($(PLATFORM),LINUX)
ORACLELIBS= -L$(ORACLE_HOME)/lib -lclntsh \
-L/usr/lib \
-lm -lpthread
endif
[SKIP]
$(ORACLE_HOME)/lib contains following files -
libclntsh.so =>libclntsh.so.11.1
libclntsh.so.10.1 =>libclntsh.so
libclntsh.so.11.1
This works fine with Oracle 11g.
Now I am wondering If I run my application with oracle 10g, Do I need to need to relink my application?
My application should work fine with both Oracle 10g and Oracle 11g. I don't want to keep two different versions..
Thanks in advance ,
Mac
If I compile mysampleApp with Oracle 10g shared
libraries, it shows dependency (ldd mysampleApp ) on
libclntsh.so.10.1. Now if I run my application on the
system having oracle 11g, it will still look for
libclntsh.so.10.1. Oracle 11g has libclntsh.so.11.1.
My application will fail.You should compile your app against either 10g or 11g, and deploy your app with the Instant Client runtime it needs. This makes your app independent of which shared libs the server uses, because you package your own Oracle runtime with your app. --DD
Similar Messages
-
How to compile Reports sample OCI program in Sun solaris ?
TO All:
Here is reports OCI sample program.
#include <stdio.h>
long ret,rwcrun(),rwcsql();
main()
char options[132];
long len;
strcpy(options,"userid=ps51/ps51 report=emp batch=yes paramform=no destype=file desname=l.ps");
printf("/options are: %s",options);
len=strlen(options);
ret=rw2run(options);
printf("/n Value of return code is %d",ret);
exit();
Pls guide me , how to compile this program in Sun Solaris platform .
1. Which library file I need to include.
2. How to create make (.mk) file.
If I compile this program using below command.
$>cc ociprg.c r30dll.o
then "rw2run" not found error.
Also I need to use RW2RRB oci function, for this which library I need to use.
Thanks in Advance
Siva
null<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by R.Siva Kumar [[email protected]]:
TO All:
Here is reports OCI sample program.
<HR></BLOCKQUOTE>
null -
How to compile and run javacard program
how to compile and run javacard program "HelloWorld"
1. Where is save Servlet program?
2. How to set classpath?
3. how compile and run?
http://www.coreservlets.com -
Help on How to compile and execute awt programs
can any1 say how to compile and execute awt programs
Edited by: 863765 on Jul 18, 2011 3:29 AMEJP wrote:
The answer is the same for anycode.Oh, but it's not. If he starts with MyClass.java, and we tell him
javac MyClass.java
java -cp . MyClassthen that advice won't work when he creates MyClass2. The poor guy will be left lost and alone, with no clue how to proceed! {noformat};-){noformat} -
How to compile and run package programs in Java
Hi,
I want to know how to compile and run the package programs in Java using -d. instead of creating the package folder manually.
eg:
package Test;
class test1
public void disp()
//Any code;
I want to compile this without creating the folder ' Test ' manually. that is if we use -d with javac the Test folder will be created automatically. I need the format of -d
could anyone please help me.
Thanks in Advance ,
AmbikaMy program Test.java in F:\Tomcat5\webapps\Ambika\WEB-INF\Classes. I compiled in the format below. I got like this. What should I do for this? But yesterday I compiled like this only, It compiled and the folder com\cert\Test.class is created. Today again I compiled the pgm after deleting the already created folder 'com\cert', I got the error like this.
I've given my pgm and the thing I've got when I compiled it.
Test.java
package com.cert;
public class Test
public void display()
System.out.println("Hai");
F:\Tomcat5\webapps\Ambika\WEB-INF\Classes>javac -d F:\Tomcat5\webapps\Ambika\WEB-INF\Classes\Test.java
javac: no source files
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are u
sed
-classpath <path> Specify where to find user class files
-cp <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-endorseddirs <dirs> Override location of endorsed standards path
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-version Version information
-help Print a synopsis of standard options
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
F:\Tomcat5\webapps\Ambika\WEB-INF\Classes>
Plz help me.
thanks in advance
Ambika -
How to compile and run java program at command console
hi there
can anyone tell me how to compile and run a java program at command console? I have installed JRE 1.3.1, and also have installed JBuilder 5 if it helps.try this
System.out.println("Enter your Name : ");
BufferedReader console = new BufferedReader( new InputStreamReader( System.in ) );
String s = console.readLine();
System.out.println("Hello : "+ s+" !" ); -
How to find version of BDC program
I have an old BDC program to upload data.
How can I find out for which version screens this program was written previously by looking at the old program from ecc5.0?
Any help is appreciated.
Thanks.IN THAT PROGRAM
GOTO
SYSTEM -> STATUS
YOU WILL FIND ALL THSES INFORMATION
REGARDS
NARESH -
How to start a independant Daemon program from another java daemon?
Hello,
I made two java daemon program Daemon_A and Daemon_B. By definition these two program work whithout any user interaction but most of it they should never fall down.
So in order to be sure that the both daemon are up (and to prevent any failure) I create a mechanism to check each other and if one is down it will be restart by the other one.
Up to now I succeed to restart the one who fall down. But ... there is always a but ...
At start:
- 1) Daemon_A and Daemon_B start.
- 2) Daemon_B fall down.
- 3) Daemon_A restart Daemon_B using this:
String[] commandArray = new String[3];
commandArray[0] = "../bin/java";
commandArray[1] = "-jar";
commandArray[2] = "Daemon_B.jar";
Process oProcess = runtime.exec ( commandArray, (String[]) null);- 4) Daemon_A and Daemon_B are UP again.
- 5) Daemon_A crash then Daemon_B is kill too.
So once the Daemon_B is restarted it seems that there is still a link between Daemon_A and Daemon_B.
As I use a command system to restart the daemon I don't understand why my Daemon_B is dependant from the Daemon_A.
Is there another way of doing this?
How can I restart my Daemon_B (from the Daemon_A) in a independant process?
As i'm running out of idea any help will be apreciate,
thanks
EmmanuelBecause you do not need javaw on Unix. You can achieve
what you want in the normal Unix way. Confer: nohup,
&, stderr and stdout redircetion.That's not correct, I can not achieve what I want on Unix.
Well with the above piece of code if I use javaw for launching my command through a system command (runtime.exec) on windows it will start a 100% independant process which is find.
But under unix if I keep using simply java the process will stay a child process. Which mean if the "father daemon_A" die daemon_B will die too.
So that's why I woudering if there is a similar program as javaw on unix to avoid create chid process using 'runtime.exec'.
You mentioned crontab: it does not make an item to act
as a deamon, it rather periodically runs it. Yhea you right my mistake I don't use the crontab to launch the program. I use "etc/init.d" (for sun solaris) and service for windows. Otherwise the daemons are "real" daemon: one's they are started they keep listening and should never fall. But to get a hight level of security I want to be sure if one fall it will be restarted whithout beeing a child process of the other one.
so any idea on unix of how can I re-start a daemon in a independant way?
regards,
emmanuel -
How to compile all the SAP programs?
Hi,
When i click on a t.code its taking sometime to compile the program associate with it. May i know how can i compile all the programs at one short so that i dont have to compile them one by one?Hi,
Type TCode--
1. -> SGEN
2. -> Select the first option as All the component
3. -> Select ALL the component like SAP_BASIS, SAP_ABA,
PI_BASIS,..... etc.
4. -> Now run it.
5. -> Select the option like Schedule it or Run Directly.
Make sure that you run SGEN in non-working hours and also suggest you to make sure that archive mode is off or your autoextend mode is on because of the load generation.
Best of Luck,
Gaurav -
How to compile and Run servlet Program
Hi,
pls help me the following doubt
i am using Tomacat 4.1 server.
1. Where is save Servlet program?
2. How to set classpath?
3. how compile and run?
bye
Mathi1. Where is save Servlet program?
2. How to set classpath?
3. how compile and run?
http://www.coreservlets.com -
How to compile and execute lex,yac,c and java programs
its the 3rd day on my New MacBook pro..
as i just migrated from windows to mac i love to work on this..
The main problem is i DON't know .......
how to compile and execute
1) lex and yac programs
2) c program
3) java program
so please help me
THIS is the error i got a1.l is a program
i got the same error when i used gcc
$ lex a1.l
$ cc lex.yy.c
Undefined symbols:
"_yywrap", referenced from:
_yylex in cc8QDQjW.o
_input in cc8QDQjW.o
ld: symbol(s) not found
collect2: ld returned 1 exit statusIs the problem that you don't know how to compile and execute these programs on a Mac, or just that you don't know how to compile and execute them?
Mac OS X is really just a version of BSD Unix, as far as programs like like bison, flex and gcc are concerned...and even when Apple specific versions are provided in the Developer Tools, there are symlinks in the usual places in the Unix file hierarchy.
For problems with lex and yacc, I suggest you start with their own references, for example, here.
Or you could just use %option noyywrap, if you only have one file to scan.
Or you could link to libfl.a using -lfl and use the default version from that library.
But you really should (as Keith Barkley was subtly hinting at) learn how these tools work and why they work that way. -
How to compile and run PRO*C programs in Linux
Hi all,
This is my first post in this forum.
I have Oracle 9i installed in linux platform .
How can i compile and run Pro*C programs in linux.(i mean any commands or procedure to run these programs)
please help me in this regard.
Thanks in advance,
Trinath Somanchi,
Hyderabad .(1) How to compile the Pro*c program U got to have a makefile to compile a Pro*c program. It helps u in compiling and creating an excutable. Once U have created a makefile , just call "make" and it will do the compilation and create the executable as well.
For a sample makefile visit
http://asktom.oracle.com/~tkyte/proc_makefile/
(2) How to run the Pro*c program ? and Once U have created an executable, U shall call that directly as any other linux command. Make sure U have the permissions to run the executable. If not give the permissions using chmod 777 executable
(3)How to get the output of the program ?Question 2 and 3 are the same. I mean running and getting a output are the same -
How to run command line argument programe
Hi guys, I am doing pass command line argument programe in java but I don't know how to run this programe. Path for this programe in my my computer is C:\Users\Desktop\Mainjava\mycode\CommandProgjava*
{code/}
public class CommandProg
public static void main(String[] args)
System.out.println("d");
for (int i = 0; i < args.length; i++)
System.out.println(args);
{code/}
Where i need to go and what command i need to give so i can execute this programe(I am using window vista). I only know i have to give
this command some where CommandProg arg1 arg2 arg3 arg4. Output should be
Output:
arg1
arg2
arg3
arg4
Please help me, Thanks in advance.
Edited by: JayVirk on Dec 30, 2007 11:33 AMJay,
Your question isn't very clear, hence Joerg's well meaning but irrelevant advise.
Do you mean:
I've written a simple program in java which echos
it's command-line arguments to back to the console.
Here's my code:
package forums;
public class ArgsEchoer
public static void main(String[] args) {
for (String arg : args) {
System.out.println(arg);
But can't figure out how to compile and run the program.
I'm using winblows shista, and it's cr@p.
Please help me, Thanks in advance.So... where are you at? Have you installed the JDK (java development kit)? Which version? Is your path set? Is your classpath set?
Start here: http://java.sun.com/developer/onlineTraining/new2java/ -
How can I run a java program on Linux?
I have JBuilder's IDE installed on my Linux partition and it works. However I don't know how to compile and test a program without it. Also I tried to install Limewire on Linux and although I've installed the Java SDK on the system. Once before I installed JBuilder and then JBuilder (I guess) installed it again. However it told me it couldn't find the Java Virtual Machine. Isn't this installed with the JDK? I am able to run programs through JBuilder so I can't see why I'd have a problem. Any answers to the above issues would be greatly appreciated.
Go here and work out how to make a simple app to compile and run on the command line: http://java.sun.com/docs/books/tutorial/getStarted/cupojava/unix.html#2b
(You should find the JDK from a directory under the jbuilder directory so use that and not the /usr/local/jdk1.4 in the example.)
Then find the classes or source code of your project and do the same thing to it. -
Compile and run java programs in different directroy
Hi,
I often encounter many problems when I run java programs in the different directories. Like
javac -d dir_name a.java
java -cp dir_name a
Something wired often happens, such as, there is not a.java file in some directory, but javac -d dir_name a.java can still work or "java -cp dir_name a" often doesn't work. Moreover, file_name.jar is also a tough problem and solving compiling problems is often time-consuming.
So I hope to read something about how to compile and run java programs in different directory properly.
Could you pleae give me a detailed description for that or recommend a book or website?
Thanks a lot.Can you post a small amount of code that does not work, including the directory structure, and the error messages? Some one here can likely explain the problem.
Maybe you are looking for
-
New iTunes: cannot sync calendar with iPhone
I just installed the new itunes and cannot sync my lokal and exchange calender with my iphone and ipad. No problems with the icloud calendars. I must have a solution for my exchange business calender!
-
Simple arithmatic error??? what am i doing wrong?
java is not multiplying large numbers correctly?? run the following program: public class Test { public static void main(String[] args) { System.out.println("testing arithmatic....."); double a = (double) 27051900; float b = (float) 56
-
Macbook Pro freezes ALL THE TIME...not even a month old
What is the deal? I got the Macbook Pro because it was supposed to be the best computer, and literally I can't do anything on it beause it is constantly frozen with the spinning color wheel. I HATE it. It's the most non productive notebook i have eve
-
I have a 27" iMac runnung Mountain Lion. When I try to opem my AOL email files saved in OSX 10.4.11 on a 20" iMacG5, I get a message saying "You cannot open the application 'America Online' because the Classic environment is no longer supported." Ar
-
WRT610N - DDNS Update not working
Hello Everybody, I am new here and appreciate your help. I have just got myself the WRT610N. I have setup the DDNS with dyndns.org and I have access via Filezilla to my FTP-Server in my NAS (its a WD Sharespace). Now my problem: The router is not upd