About the <cpptask:cc> g++ can not work
"Wang Ting-KFN436" <[email protected]> Wed, 11 Mar 2009 18:05:28 +0800
| Newsgroups | gmane.comp.java.ant-contrib.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============9120282635517103872==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C9A230.E7FED853"
This is a multi-part message in MIME format.
------_=_NextPart_001_01C9A230.E7FED853
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hello,
=20
=20
I meet a problem, I wrote a build.xml which use the tag <cpptask:cc> to
generate the shared .so I needed. However, it really can generate but
will get the error:"undefined symbol:_ZNSs4_Rep11_S_terminalE" ;
=20
-rwxr-xr-x 1 s3op5 netop 97462 Mar 11 08:53 libimgdownsample.so_bad
-rwxr-xr-x 1 s3op5 netop 98220 Mar 9 08:36 libimgdownsample.so.good=20
=20
and the size is different.
=20
the work one I use: g++ -I/data/s3op5/java/jdk1.6.0_12/include
-I/data/s3op5/java/jdk1.6.0_12/include/linux -fPIC -shared
-Wl,-soname,libimgdownsample.so -o libimgdownsample.so ImgDownSample.cpp
-I/usr/local/include/ImageMagick -g -O2 -Wall -W -pthread
-L/usr/local/lib -L/usr/X11R6/lib -L/usr/lib64 -Wl,--rpath
-Wl,/usr/lib64 -lfreetype -lz -L/usr/local/lib
-L/usr/local/lib -lMagick++ -lMagickWand -lMagickCore -ltiff -lfreetype
-ljpeg -lfontconfig -lX11 -lbz2 -lz -lm -lpthread =20
to generate.
=20
=20
my build.xml
=20
<project name=3D"hello" default=3D"compile"
xmlns:cpptasks=3D"antlib:net.sf.antcontrib.cpptasks">
<target name=3D"javah">
<exec dir=3D"." executable=3D"javah" > =20
<arg line=3D"-classpath .
com.motorola.blur.service.common.photos.imaging.ImgDownSample"/>
</exec>
</target>
=20
<target name=3D"compile" depends=3D"javah">
<mkdir dir=3D"target/main/obj"/>
<cpptasks:cc outtype=3D"shared" subsystem=3D"console"
outfile=3D"imgdownsample" objdir=3D"target/main/obj">
<fileset dir=3D"." includes=3D"*.cpp"/>
<cpptasks:compiler name=3D"g++"/>
<cpptasks:compilerarg
value=3D"-I/data/s3op5/java/jdk1.6.0_12/include"/>
<cpptasks:compilerarg
value=3D"-I/data/s3op5/java/jdk1.6.0_12/include/linux"/>
<cpptasks:compilerarg value=3D"-fPIC"/>
<cpptasks:compilerarg
value=3D"-I/usr/local/include/ImageMagick"/>
<cpptasks:compilerarg value=3D"-g"/>
<cpptasks:compilerarg value=3D"-O2"/>
<cpptasks:compilerarg value=3D"-Wall"/>
<cpptasks:compilerarg value=3D"-W"/>
<cpptasks:compilerarg value=3D"-pthread"/>
<cpptasks:compilerarg value=3D"-L/usr/local/lib
-L/usr/X11R6/lib -L/usr/lib64 -Wl,--rpath -Wl,/usr/lib64 -lfreetype -lz
-L/
usr/local/lib"/>
<cpptasks:compilerarg value=3D"-L/usr/local/lib -lMagick++
-lMagickWand -lMagickCore -ltiff -lfreetype -ljpeg -lfontconfig=20
-lX11 -lbz2 -lz -lm -lpthread "/>
</cpptasks:cc>
</target>
</project>
=20
=20
If you get any idea, please let me know.=20
=20
Thanks=20
=20
=20
Robert Wang=20
=20
------_=_NextPart_001_01C9A230.E7FED853
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2900.3492" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D305395809-11032009><FONT =
size=3D2>Hello,</FONT></SPAN></DIV>
<DIV><SPAN class=3D305395809-11032009><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D305395809-11032009><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D305395809-11032009><FONT size=3D2> I meet a =
problem, I wrote=20
a build.xml which use the tag <cpptask:cc> to generate the shared =
.so I=20
needed. However, it really can generate but will get the =
error:"undefined=20
symbol:_ZNSs4_Rep11_S_terminalE" ;</FONT></SPAN></DIV>
<DIV><SPAN class=3D305395809-11032009><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D305395809-11032009><FONT =
size=3D2> -rwxr-xr-x 1 s3op5=20
netop 97462 Mar 11 08:53 =
libimgdownsample.so_bad<BR> -rwxr-xr-x =20
1 s3op5 netop 98220 Mar 9 08:36 libimgdownsample.so.good=20
</FONT></SPAN></DIV>
<DIV><SPAN class=3D305395809-11032009><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D305395809-11032009><FONT size=3D2>and the size is=20
different.</FONT></SPAN></DIV>
<DIV><SPAN class=3D305395809-11032009><FONT =
size=3D2> </FONT></SPAN></DIV>
<DIV><SPAN class=3D305395809-11032009><FONT size=3D2>the work one I use: =
g++ =20
-I/data/s3op5/java/jdk1.6.0_12/include=20
-I/data/s3op5/java/jdk1.6.0_12/include/linux -fPIC -shared=20
-Wl,-soname,libimgdownsample.so -o libimgdownsample.so=20
ImgDownSample.cpp -I/usr/local/include/ImageMagick -g -O2 -Wall -W=20
-pthread<BR>-L/usr/local/lib -L/usr/X11R6/lib -L/usr/lib64 -Wl,--rpath=20
-Wl,/usr/lib64 -lfreetype -lz -L/usr/local/lib<BR>-L/usr/local/lib =
-lMagick++=20
-lMagickWand -lMagickCore -ltiff -lfreetype -ljpeg -lfontconfig -lX11 =
-lbz2 -lz=20
-lm -lpthread </FONT></SPAN></DIV>
<DIV><SPAN class=3D305395809-11032009><FONT size=3D2>to=20
generate.</FONT></SPAN></DIV>
<DIV><SPAN class=3D305395809-11032009><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D305395809-11032009><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D305395809-11032009><FONT size=3D2>my=20
build.xml</FONT></SPAN></DIV>
<DIV><SPAN class=3D305395809-11032009><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D305395809-11032009><FONT size=3D2><project =
name=3D"hello"=20
default=3D"compile"=20
xmlns:cpptasks=3D"antlib:net.sf.antcontrib.cpptasks"><BR> &=
nbsp;=20
<target name=3D"javah"><BR> =
<exec=20
dir=3D"." executable=3D"javah" > =20
<BR> <arg =
line=3D"-classpath .=20
com.motorola.blur.service.common.photos.imaging.ImgDownSample"/><BR>&n=
bsp; =20
</exec><BR> =20
</target><BR> <BR> <target =
name=3D"compile"=20
depends=3D"javah"><BR> =
<mkdir=20
dir=3D"target/main/obj"/><BR>  =
; =20
<cpptasks:cc outtype=3D"shared" subsystem=3D"console" =
outfile=3D"imgdownsample"=20
objdir=3D"target/main/obj"><BR> &nb=
sp; =20
<fileset dir=3D"."=20
includes=3D"*.cpp"/><BR> &nbs=
p; =20
<cpptasks:compiler=20
name=3D"g++"/><BR> &nbs=
p; =20
<cpptasks:compilerarg=20
value=3D"-I/data/s3op5/java/jdk1.6.0_12/include"/><BR> &nbs=
p; =20
<cpptasks:compilerarg=20
value=3D"-I/data/s3op5/java/jdk1.6.0_12/include/linux"/><BR> &nbs=
p; =20
<cpptasks:compilerarg=20
value=3D"-fPIC"/><BR> &=
nbsp; =20
<cpptasks:compilerarg=20
value=3D"-I/usr/local/include/ImageMagick"/><BR> &nbs=
p; =20
<cpptasks:compilerarg=20
value=3D"-g"/><BR> &nbs=
p; =20
<cpptasks:compilerarg=20
value=3D"-O2"/><BR> &nb=
sp; =20
<cpptasks:compilerarg=20
value=3D"-Wall"/><BR> &=
nbsp; =20
<cpptasks:compilerarg=20
value=3D"-W"/><BR> &nbs=
p; =20
<cpptasks:compilerarg=20
value=3D"-pthread"/><BR> &nbs=
p; =20
<cpptasks:compilerarg value=3D"-L/usr/local/lib -L/usr/X11R6/lib =
-L/usr/lib64=20
-Wl,--rpath -Wl,/usr/lib64 -lfreetype -lz=20
-L/<BR>usr/local/lib"/><BR> &=
nbsp; =20
<cpptasks:compilerarg value=3D"-L/usr/local/lib -lMagick++ =
-lMagickWand=20
-lMagickCore -ltiff -lfreetype -ljpeg -lfontconfig <BR>-lX11 -lbz2 -lz =
-lm=20
-lpthread "/><BR> =20
</cpptasks:cc><BR> =20
</target><BR></project></FONT></SPAN></DIV>
<DIV><SPAN class=3D305395809-11032009><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D305395809-11032009><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D305395809-11032009><FONT size=3D2>If you get any =
idea, please let=20
me know. </FONT></SPAN></DIV>
<DIV><SPAN class=3D305395809-11032009><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D305395809-11032009><FONT size=3D2>Thanks =
</FONT></SPAN></DIV>
<DIV><SPAN class=3D305395809-11032009><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D305395809-11032009><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D305395809-11032009><FONT size=3D2>Robert Wang=20
</FONT></SPAN></DIV>
<DIV><SPAN class=3D305395809-11032009><FONT face=3D宋体=20
size=3D2></FONT></SPAN> </DIV></BODY></HTML>
------_=_NextPart_001_01C9A230.E7FED853--
--===============9120282635517103872==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
--===============9120282635517103872==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Ant-contrib-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ant-contrib-developers
--===============9120282635517103872==--