From: Rutger H. <ru...@cs...> - 2004-02-06 17:39:21
|
After I did a CVS checkout of cpptasks, everything works fine for the Mac. Thanks! Rutger Hofman VU Amsterdam Mirko Raner wrote: > Hi Rutger, > > I'm not a Mac user, but maybe your problem is just related to an > out-of-date version of cpptasks. > I noticed that the class AbstractLdLinker in the CVS contains some (more > or less) recent modifications that seem to deal with MacOS X and the gcc > -shared flag. If you are not working with the latest version from CVS > you should definitely check out and build a new cpptasks JAR file. > > Just a thought... > > Mirko > > Rutger Hofman wrote: > >> I feel I was hopelessly unclear again. >> Let me try again and insert some phrases that >> show that I (we) indeed have a problem on Mac. >> >> The ultimate question remains. Shouldn't someone >> (somebody of the cpptasks developers, or me) >> patch the linker driver for gcc on Mac OS X? >> >> Rutger >> >> --------------------------------------------------- >> >> Try again: >> >> Hi list >> >> I try to compile my project on a Mac, now. >> This is my first Mac experience, so I did not >> expect immediate victory. >> The project is Java but with native code, >> so I require generation of a dynamic shared >> library. >> >> So my target invocation looks like: >> >> <cc outtype="shared" name="gcc"> >> <fileset dir="my-native-dir" includes="*.c"/> >> </cc> >> >> This invokes gcc successfully for the compilation bla.c -> bla.o >> Now <cc> invokes the link phase, and exits with the error message: >> ... >> [cc] Starting link >> [cc] gcc: unrecognized option '-shared' >> ... >> >> The problem is documented in the Mac man pages for gcc: >> gcc -shared is not supported on Mac OS X. >> >> The way to get a dynamic shared library seems >> to be by invocation of >> libtool -dynamic -o libBLA.dylib BLA.o >> (which seems to invoke ld -dylib ....) >> >> If I specify that I want to use libtool, things go >> wrong at a much earlier stage: bla.c -> bla.o fails >> completely, so I guess that is a less promising approach >> overall. >> >> Question: >> - is there another, supported way to get a dynamic >> shared library that I overlooked? >> - or should somebody (developers, me) add support >> for Mac to the gcc driver in that the gcc -shared >> command is replaced by the libtool command? >> >> Rutger Hofman >> VU Amsterdam >> http://www.cs.vu.nl/~rutger >> >> >> ------------------------------------------------------- >> The SF.Net email is sponsored by EclipseCon 2004 >> Premiere Conference on Open Tools Development and Integration >> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. >> http://www.eclipsecon.org/osdn >> _______________________________________________ >> Ant-contrib-developers mailing list >> Ant...@li... >> https://lists.sourceforge.net/lists/listinfo/ant-contrib-developers >> > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Ant-contrib-developers mailing list > Ant...@li... > https://lists.sourceforge.net/lists/listinfo/ant-contrib-developers |