From: Werner S. <sm...@ia...> - 2007-03-03 16:26:23
|
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. 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. First example, same problem. Change, compile, copy. But than: gnatmake: "x01a.exe.adb" not found so the extension is a problem. Ok, this gets now a little tedious - I actually don't know how to fix the .obj/.o problem. This is set by cmake, but mingw-gnat obviously is buggy here. And than it seems the .exe is in <TARGET>, which you use, Alan, instead of <SOURCE> or so, if I followed your posts to the CMake List correctly. So, any help would be appreciated. - Werner Alan W. Irwin wrote: > On 2007-03-01 09:40-0800 Alan W. Irwin wrote: > >> On 2007-02-28 19:34-0700 Jerry wrote: >> >>> So--I recommend just renaming all the example files to x??a.adb and >>> letting them run as standalones, and eliminating the x??.adb and >>> x??.ads naming level completely. That was my intention originally but >>> I see that I forgot to adopt that naming convention. I can take care >>> of this. >> Hi Jerry: >> -- Dipl. Ing. Werner Smekal Institut fuer Allgemeine Physik Technische Universitaet Wien Wiedner Hauptstr 8-10 A-1040 Wien Austria email: sm...@ia... web: http://www.iap.tuwien.ac.at/~smekal phone: +43-(0)1-58801-13463 (office) +43-(0)1-58801-13469 (laboratory) fax: +43-(0)1-58801-13499 |