From: Marcel R. <ru...@sw...> - 2002-04-09 08:25:25
|
Curt Arnold wrote: > I just committed changes that will get closer to building with GCC. There > were two issues, one was that the Linker overrode the bid() method so the > array of extensions that were modifying were not actually used. The second > was that explicit object files were not being send out for bidding > appropriately. I still have this .so problem, i try to link with /opt/local/mico/lib/libmico2.3.7.so and the rules i have tried are: <fileset dir="${CORBACPP_HOME}/lib" includes="mico${CORBACPP_VER}" /> <fileset dir="${CORBACPP_HOME}/lib" includes="libmico${CORBACPP_VER}" /> <fileset dir="${CORBACPP_HOME}/lib" includes="libmico${CORBACPP_VER}.so" /> I would expect the first fileset notation to be correct (on Linux), mico2.3.7 --->cpptasks---> libmico2.3.7.so But only the last variant succeeded. The extension ".so" on Linux, ".sl" on HPUX etc. should be added by ant. The "lib" praefix as well. > > I also followed through and changed <libset> to <syslibset>. <syslibset> > has a content model identical to a <fileset> except you cannot specify a dir > attribute. See the xercesc.ant sample for examples on usage. I wonder why you don't use <taskdef name="foreach" classname="net.sf.antcontrib.logic.ForEach" /> <taskdef name="switch" classname="net.sf.antcontrib.logic.Switch" /> <taskdef name="if" classname="net.sf.antcontrib.logic.IfTask" /> <taskdef name="osfamily" classname="net.sf.antcontrib.platform.OsFamily" /> in your xerces.ant, especially osfamily could be helpful. To compile all C++ test files the for loop is an excellent soultion: <target name="cpp-test" depends="prepare"> <foreach list="CreateDOMDocument,DOMCount,DOMIDTest,..." target="compileCppExe" param="exeName" delimiter="," /> </target> <target name="compileCppExe"> <echo message="Compiling of C++ test client ${testsuite.dir}/c++/bin/${exeName}' ..."/> <mkdir dir="${build.dir}/obj"/> <mkdir dir="${testsuite.dir}/c++/bin"/> <cc debug="true" link="executable" ... So you can compile everything with only one cc task. > > I'm still having problems with the simple static library problem (test1) in > cpptasks/test. I'm building a static library that appears to contain the > right stuff, but the link fails with unresolved references even when running > the link step from the command line. After attempting to build test1, I can > manually link using > > gcc -o testapp.exe test_static.o test_static2.o shared.dll testapp.o > > but > > ar rvs static.lib test_static.o test_static2.o > gcc -o testapp.exe static.lib shared.dll testapp.o > > will fail with unresolved references. Probably a mix of /MT and /MD libs (thread save and not thread save?) thanks for your valuable work, Marcel -- Marcel Ruff mailto:ru...@sw... http://www.lake.de/home/lake/swand/ http://www.xmlBlaster.org |