header file inline causing problems
Michael Koch
konqueror@gmx.de
Thu Apr 7 05:51:00 GMT 2005
On Wed, Apr 06, 2005 at 03:09:47PM -0500, Steve Pribyl wrote:
> I am getting duplicate methods in my libgcj.a on mingw and it looks like it is caused by a problem with an inline
> function in the header.
>> Example
> In the source tree libjava/java/util/logging/Logger.java
> /**
> * Returns the name of this logger.
> *
> * @return the name of this logger, or <code>null</code> if
> * the logger is anonymous.
> */
> public String getName()
> {
> /* Note that the name of a logger cannot be changed during
> * its lifetime, so no synchronization is needed.
> */
> return name;
> }
>> In the obj tree libjava/java/util/logging/Logger.h
> virtual ::java::lang::String *getName () { return name; }
>> This causes both Logger.o and natLogger.o to contain the Logger.getName code.
Can you try to remove the native one (in natLogger.cc) and rebuild?
Michael
--
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
Join the community at http://planet.classpath.org/
More information about the Java
mailing list