This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: undefined refrence error


Dear Andrew,
 
Thank you very much for this information i want to ask , do  you main i use the  -L option with the path for the .jar.so file without -llibname .
 
Thanks 
Hegazy 
> Date: Wed, 8 Jul 2009 15:23:14 +0100
> From: aph@redhat.com
> To: engmohheg@hotmail.com
> CC: gcc-help@gcc.gnu.org
> Subject: Re: undefined refrence error
> 
> mohammed hegazy wrote:
> 
>> when using gcj to compile a jar file that depends on another jar
>> libraries like apache log4j i found undefined reference errors :
>> 
>> : undefined reference to `org::apache::log4j::Logger*
>> org::apache::log4j::Logger::getLogger(java::lang::Class*)'
>> 
>> 
>> 
>> the command that i used is :
>> 
>> gcj --classpath="lib/log4j-1.2.14.jar"
>> --main=Loader.Main WebInterface.jar -o HH
>> 
>> 
>> 
>> am I doing anything wrong , please advice ?
> 
> You just need to compile with -findirect-dispatch and make sure
> you link against the libraries like /usr/lib64/gcj/log4j/log4j-1.2.14.jar.so.
> 
> It's just like building a C or a C++ project. Are you familiar with
> that process?
> 
> Andrew.
_________________________________________________________________
Windows Live™: Keep your life in sync. Check it out!
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009


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