This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: shared library


>>>>> "Jayesh" == Jayesh K Parayali <jparayali@TOTALFLOOD.com> writes:

>> I compiled postgres jdbc jar into jdbc.so using gcj and moved it into
>> usr/local/gcc/lib which is in my LD_LIBRARY_PATH
>> Then I created an application which uses jdbc and compiled it to
>> native code using gcj
>> now when I run the application, it's not able to find(load) the jdbc
>> driver.

>> Note that the application works fine 
>> 1.) If I add the jdbc jar file to my CLASSPATH
>> 2.) Or compile the application with jdbc.so

For #2 do you mean you have to link using `-ljdbc'?
If so then that is normal.  Right now using gcj isn't much different
from using gcc or g++.  You have to link against the libraries you
use.  I'm surprised that your application could link without this.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]