Hi Werner: On 2007-03-03 17:25+0100 Werner Smekal wrote:
> Hi Alan, > > I'm just testing the ada bindings with MinGW but there are some problems. So > far I solved the following ones: > > 1) gnat library is not found - we need to set CMAKE_LIBRARY_PATH: > > rem setup ada > set > CMAKE_LIBRARY_PATH=%MINGWDIR%\lib\gcc\mingw32\3.4.5\adalib;%CMAKE_LIBRARY_PATH% > > where MINGWDIR is the path to the MinGW installation. > > 2) gnatgcc doesn't exist - in Windows this is gcc! In > "CMakeDetermineAdaCompiler.cmake" change line 33 to > > SET(CMAKE_Ada_COMPILER_LIST gnatgcc gcc) > > though I don't think that that is the correct way to do it - don't know if > Linux/Mac OSX gcc knows how to handle ada files. Don't know why Windows gcc > knows it. gnat is an extension to gcc, but it seems to be implemented differently than other extensions such as g77. For example, gnatgcc (on Linux systems at least) is simply a symlink to a generic versioned form of gcc while g77 is symlinked to a versioned form of a g77 executable. OTOH, I know that gnat is definitely something more than just gcc alone. Perhaps the solution is to use gnatmake to wrap compilations. I will see whether I can arrange that. > > Than cmake configures happily, but we encounter problems while compiling: > > [ 45%] Building Ada object bindings/ada/CMakeFiles/plplotadad.dir/plplot.obj > C:\DevZone\MinGW-3.4.5\bin\gcc.exe -Dplplotadad_EXPORTS -DHAVE_CONFIG_H -o > bindings/ada/CMakeFiles/plplotadad.dir/plplot.obj -c > Z:\DevZone\PLdev\plplot\bindings\ada\plplot.adb > gnat1: incorrect object file extension > > Argh, gnat1 wants to have .o as ending instead of .obj though the latter one > is Windows style. If I run the last command and change plplot.obj to plplot.o > it compiles! I need to copy it to obj, than cmake accepts it and continues > but than the same with the thin library. Change command to .o by hand, > compile, copy it. Than library builds. 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. So I have to ask (rhetorically) what is causing problems with the .obj suffix for the Ada case? Possibly it's a matter of using the correct compilation options for gcc. It's possible those will automatically be generated if I use gnatmake to wrap the compilation (see above). Of course, gnatmake doesn't know how to create libraries so gcc must always be used for the special linking step that creates the shared library. > > gnatmake: "x01a.exe.adb" not found > > so the extension is a problem. I was afraid of that. There are several possibilities for fixing this, but lets wait to try those out until after I have done some experiments with wrapping the compilations with gnatmake to see if that solves the *.obj suffix problems. Thanks for your report. 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