* compiling C files with gnat project files
@ 2006-11-13 13:47 evangeli
2006-11-13 14:16 ` Ludovic Brenta
0 siblings, 1 reply; 5+ messages in thread
From: evangeli @ 2006-11-13 13:47 UTC (permalink / raw)
Hello,
I am trying to use gnat project files in my project which contains
some Ada and C files.
I have the following tree :
--==========
src/
helena.gpr
src/utils/
sizeof.h
sizeof.c
src/progs/
helena_main.adb
src/obj/
--==========
src/progs/helena_main.adb must be compiled and linked with sizeof.o
I want to compile src/progs/helena_main.adb into executable helena and
put it into src/../bin/
so here is the helena.gpr I made:
--==========
project Helena is
for Object_Dir use "obj";
for Exec_Dir use "../bin";
for Source_Dirs use ("utils", "progs");
for Languages use ("Ada", "C");
for Main use ("helena_main.adb");
package Compiler is
for Default_Switches ("Ada") use
("-O3", "-gnat05", "-gnata", "-gnatyM79", "-gnatwvrmkc");
for Default_Switches ("C") use ("-O3");
end Compiler;
package Linker is
for Default_Switches ("Ada") use ("obj/sizeof.o");
for Default_Switches ("C") use ();
end Linker;
package Builder is
for Executable ("helena_main.adb") use "helena";
end Builder;
end Helena;
--==========
when I launch the following command:
> gnatmake -P helena.gpr
the file sizeof.c in src/utils is not compiled.
however, if I compile sizeof.c manually and put sizeof.o in src/obj
the compilation works fine.
I looked at
http://www.adacore.com/wp-content/files/auto_update/gnat-unw-docs/html/gnat_ugn_12.html
but i did not find help on how to do this.
thanks for any help
Sami
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: compiling C files with gnat project files
2006-11-13 13:47 compiling C files with gnat project files evangeli
@ 2006-11-13 14:16 ` Ludovic Brenta
2006-11-13 14:23 ` evangeli
2006-11-13 14:26 ` Alex R. Mosteo
0 siblings, 2 replies; 5+ messages in thread
From: Ludovic Brenta @ 2006-11-13 14:16 UTC (permalink / raw)
Try gprmake instead of gnatmake.
--
Ludovic Brenta.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: compiling C files with gnat project files
2006-11-13 14:16 ` Ludovic Brenta
@ 2006-11-13 14:23 ` evangeli
2006-11-13 14:26 ` Alex R. Mosteo
1 sibling, 0 replies; 5+ messages in thread
From: evangeli @ 2006-11-13 14:23 UTC (permalink / raw)
> Try gprmake instead of gnatmake.
>
> --
> Ludovic Brenta.
OK, that works fine.
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: compiling C files with gnat project files
2006-11-13 14:16 ` Ludovic Brenta
2006-11-13 14:23 ` evangeli
@ 2006-11-13 14:26 ` Alex R. Mosteo
2006-11-13 20:24 ` sphinxmoro
1 sibling, 1 reply; 5+ messages in thread
From: Alex R. Mosteo @ 2006-11-13 14:26 UTC (permalink / raw)
Ludovic Brenta wrote:
> Try gprmake instead of gnatmake.
Or enable Edit->Preferences->General->Multi language build if you use GPS.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: compiling C files with gnat project files
2006-11-13 14:26 ` Alex R. Mosteo
@ 2006-11-13 20:24 ` sphinxmoro
0 siblings, 0 replies; 5+ messages in thread
From: sphinxmoro @ 2006-11-13 20:24 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 222 bytes --]
Alex R. Mosteo a écrit :
> Ludovic Brenta wrote:
>
> > Try gprmake instead of gnatmake.
>
> Or enable Edit->Preferences->General->Multi language build if you use GPS.
Yes it is another working solution.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-11-13 20:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-13 13:47 compiling C files with gnat project files evangeli
2006-11-13 14:16 ` Ludovic Brenta
2006-11-13 14:23 ` evangeli
2006-11-13 14:26 ` Alex R. Mosteo
2006-11-13 20:24 ` sphinxmoro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox