Re: [jnc-users] Problem of "multiple definition of..." compiling with Spring, Xalan
Status: Beta
Brought to you by:
soapy
From: Marco T. <ma...@mt...> - 2010-06-11 07:10:00
|
Hey Kamesh If you have the same classes in multiple jars, then the cleanest thing to do would be to delete them in all except one jar. Anyway, you're probably looking for a workaround. So, adding "-Wl,--allow-multiple-definition" as custom compilation flag should do the trick. Hope that helps Marco On 10.06.2010 19:31, Kameswara Rao Bhiravabhatla wrote: > Hi, > My program uses Spring and Xalan libraries. I am using latest JNC to > compile my program on Windows into an exe. When I check the checkbox > "Compile complete jar", it gives me errors like "multiple definition > of...". > Example: > multiple definition of > `org::w3c::dom::xpath::XPathException::XPathException(short, > java::lang::String*)' > /lib/xalan-2.5.1-win.jar.o:xalan-2.5.1.jar:(.text+0x579520): first > defined here > /javanativecompiler-1.1.1/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.0/../../../libgcj.a(org-w3c.o): > In function > `ZN3org3w3c3dom6events14EventExceptionC1EsPN4java4lang6StringE':/usr/local/src/gcc/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventException.java:24: > multiple definition of `org::w3c::dom::xpath::XPathExpression::class$$' > If I do not check the Checkbox, the xalan libraries are not included in > my executable since they are invoked dynamically by Spring. > Can anyone please let me know how to resolve this issue. Is there a way > to mention the compiler to take one of the definitions (both are same) > but only exist in different jar files. > Thanks, > Kamesh > > > > iGATE is Ranked No. 1 in DQ-IDC best IT employer survey and Ranked No.2 > by Business Today-Mercer Human Resource Consulting-TNS in a cross > industry survey of Best Companies to work for in India > ----------------------------------------------------------------DISCLAIMER--------------------------------------------------------- > Information transmitted by this EMAIL is proprietary to iGATE Group of > Companies and is intended for use only by the individual > or entity to whom it is addressed and may contain information that is > privileged, confidential, or exempt from disclosure under > applicable law. If you are not the intended recipient of this EMAIL > immediately notify the sender at iGATE or mai...@ig... > and delete this EMAIL including any attachments > > > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > > > > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users |