Hooray!  I got it to statically compile on Unix using the following Ant
file:

# <project name="iGlanceServer" default="compile">
#       <target name="compile">
#               <exec executable="g++">
#                       <arg value="-oiglanced"/>
#                       <arg value="-I./unixlibs/apr-1/include/apr-1"/>
#                       <arg file="main.cpp"/>
#                       <arg
file="/mnt/hgfs/VMShared/APRtest/unixlibs/apr-1/lib/libapr-1.a"/>
#                       <arg value="-lpthread"/>
#               </exec>
#       </target>
# </project> 

However, the executable is huge -- like 600KB.  I thought the linker would
throw away everything that the application doesn't use?  Or did my "fix"
mean including the entire library?

-david

Reply via email to