[gps-users] invalid switch

Chris Douty Chris_Douty at ampex.com
Wed Dec 20 19:02:58 CET 2006


On Dec 19, 2006, at 7:27 AM, Philippe Laval wrote:

> For some time I use the GPL Edition of GPS v. 3.1.3 on Windows XP  
> SP2, in Ada 95 mode (no 2005 code yet).
> Until now I had no problem. The compilation runs even faster than  
> with Gnat 3.15p. (With 3.15p and adagide there is no compilation  
> error and the code executes just fine).
> Now with GPS, if Isuppress for example a colon in a file, say salps- 
> save.adb, I obtain:
>
> gnatmake -Pe:\ada\gnat\rts3-xp\project\rts3.gpr rts3_xp.adb -d
> gcc -c -o e:\ada\gnat\rts3-xp\project\..\exec\salps-save.o -O3 - 
> gnatQ -g -gnat95 -gnatwc -gnatwd -gnatwf -gnatwh -gnatwj -gnatwk - 
> gnatwl -gnatwm -gnatwp -gnatwr -gnatwu -gnatwv -gnatA e:\ada\gnat 
> \rts3-xp\project\..\sources\salps-save.adb
> gnat1: invalid switch: 9
^^^^^^^^^^^^^^^^ clue here.
> gnatmake: "e:\ada\gnat\rts3-xp\project\..\sources\salps-save.adb"  
> compilation error [ok, but does not say where!]
> process exited with status 4
>
> There is probably an error in the project file. I tried several  
> other combinations of switches, but I am unable to find what is wrong.


Philippe,

I think that this is a path error.  Do you still have gnat 3.15  
installed on this machine?  gnatmake is executing the gcc driver  
which invokes the actual compiler, gnat1.  The actual gnat1 is  
complaining that it does not understand the "9" switch which would  
probably come from "-gnat95" switch on the gcc line in your trace.   
Either gnatmake is invoke the wrong gcc (most likely) or gcc is  
finding an older gnat1 which doesn't understand the -gnat95 switch.

I haven't been working on Windows for a while and don't have gnat GPL  
2006 installed, so I can't give you specifics on how to fix this  
problem.  The whole MinGW/gcc toolchain that is used on Windows is  
quite complicated in figuring out actual paths, so I sympathize.   
BTW, your project file is probably fine.  It is the tool installation  
that is at fault.

Good luck,
	Chris

-- 
Christopher Douty <Chris_Douty at ampexdata.com> +1-650-367-3129
Senior Engineer, Software & Systems  - AMPEX Data Systems Corp.




More information about the gps-users mailing list