Index: CCTask.java =================================================================== RCS file: /cvsroot/ant-contrib/cpptasks/src/net/sf/antcontrib/cpptasks/CCTask.java,v retrieving revision 1.47 diff -c -r1.47 CCTask.java *** CCTask.java 28 Feb 2004 20:04:02 -0000 1.47 --- CCTask.java 9 Mar 2004 11:01:31 -0000 *************** *** 706,711 **** --- 706,712 ---- // files the linker knows how to consume // Enumeration compileTargetsEnum = compileTargets.elements(); + int linkfileOffset = 0; while (compileTargetsEnum.hasMoreElements()) { TargetInfo compileTarget = (TargetInfo) compileTargetsEnum .nextElement(); *************** *** 714,720 **** // int bid = linkerConfig.bid(compileTarget.getOutput().toString()); if (bid > 0) { ! objectFiles.addElement(compileTarget.getOutput()); } } File[] objectFileArray = new File[objectFiles.size()]; --- 715,725 ---- // int bid = linkerConfig.bid(compileTarget.getOutput().toString()); if (bid > 0) { ! // Add the current object file, but before previously claimed ! // files. Respect the order of the compileTargets. ! // Patch 09 Mar 2004 by Rutger Hofman, VU Amsterdam. ! objectFiles.add(linkfileOffset, compileTarget.getOutput()); ! linkfileOffset++; } } File[] objectFileArray = new File[objectFiles.size()];