Hi Alan,

> What happens when you run gnatmake testadacompiler.adb where that file
> consists of the following simple Ada source?
> 
> procedure testAdaCompiler is
> begin
>    null;
> end;
> 

For MinGW we obtain:

Z:\DevZone>gnatmake testadacompiler.adb
gcc -c testadacompiler.adb
gnatbind -x testadacompiler.ali
gnatlink testadacompiler.ali

and we find the following files after the compilation:

testadacompiler.adb
testadacompiler.ali
testadacompiler.exe
testadacompiler.o

So a .o file is produced not a .obj file (as expected).

I search the internet and found this:

http://gcc.gnu.org/onlinedocs/gcc-4.0.1/gnat_ugn_unw/Switches-for-gcc.html#Switches-for-gcc

If I run gcc on the ada file with the option -v I get:

Z:\DevZone>gcc -c testadacompiler.adb -o testadacompiler.obj -v
Reading specs from C:/DevZone/MinGW-3.4.5/bin/../lib/gcc/mingw32/3.4.5/specs
Configured with: ../gcc-3.4.5/configure --with-gcc --with-gnu-ld 
--with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw 
--enable-threads --disable-nls 
--enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry 
--disable-shared --enable-sjlj-exceptions --enable-libgcj 
--disable-java-awt --without-x --enable-java-gc=boehm 
--disable-libgcj-debug --enable-interpreter 
--enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.5 (mingw special)
  C:/DevZone/MinGW-3.4.5/bin/../libexec/gcc/mingw32/3.4.5/gnat1.exe 
-quiet -dumpbase testadacompiler.adb -gnatO testadacompiler.obj 
testadacompiler.adb -o C:\DOKUME~1\smekal\LOKALE~1\Temp/ccmSaaaa.s
gnat1: incorrect object file extension


> 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.

I think gnat1, which is called by gcc, doesn't accept a object file name 
with any other ending as .o - I tried some other file endings and we 
have the same problem. So I think this is also a dead end - this is a 
bug of gnat1 and we need a work around...

Werner

-- 
Dipl. Ing. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: [EMAIL PROTECTED]
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

-------------------------------------------------------------------------
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

Reply via email to