On 2007-03-03 21:18+0100 Werner Smekal wrote: > Hi Alan, >> That's a surprising result. What happens for the equivalent PLplot C core >> library build? I assume the extensions for the -o option will be .obj (like >> above), that gcc will build those objects without complaint, and in the next >> step (doing the special linking with gcc to create the shared library) gcc >> will happily link the *.obj files into the shared library. > Yes, gcc has actually no problems with the .obj extension. But gcc seems > to call gnat1 to compile the ada file and though I found a description > of gnat for Windows, where it is explained that the -o option should be > used to set the output filename with the ending .obj or .o, it seems > there is a bug, that prevents gnat1 from accepting .obj files. Since > normally someone uses gnatmake this was no problem so far?
I thought gnatmake might be the solution, but I have just done a series of exhaustive tests, and there is no way that it works correctly with the -o option or the -cargs -o options. (In the first case, the -o option is not passed to the compiler. In the latter case it calls the compiler with the correct -o option, but then it checks afterward for the object files it expects in the directory where it was invoked, doesn't find them, and errors out.) I have concluded that gnatmake cannot be used for compiles where you want control of the path+name of the resulting object file. What happens when you run gnatmake testadacompiler.adb where that file consists of the following simple Ada source? procedure testAdaCompiler is begin null; end; On my Debian stable system it simply generates the following commands: [EMAIL PROTECTED]> gnatmake testadacompiler.adb gcc-3.3 -c testadacompiler.adb gnatbind -x testadacompiler.ali gnatlink testadacompiler.ali Also testadacompiler.o is produced. Does this test produce *.o or *.obj output on MinGW? The point of this test is I am wondering if gnatmake will generate a *.obj file by default, and if it uses special flags on the gcc command to make that happen. From my results above we cannot use gnatmake to compile when we need to control the output path+name, but if this test lets us know the correct compile options for gcc to generate a *.obj, then we can use those flags plus the ordinary gcc -o option to get the desired result on MinGW. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel