[Fwd: Re: [gps-users] multilanguage compilation]
André Laurens
Andre.Laurens at cnes.fr
Thu Mar 17 13:29:24 CET 2005
Arnaud Charlet a écrit :
> Without neither the former nor the new gpr file, nor the actual
> build output, there is not much that we can guess from your message
> unfortunately, except that there is an error somewhere.
>
My new gpr file, given below, has been generated by the GPS 2.1.0
project wizard.
I'll not copy here the build output since it's pretty long but mainly it
shows :
- that all Ada files are compiled correctly
- no C file are compiled (nor library built)
- bind works without error
- link fails with 'undefined reference to ...' messages related to all
imported C functions that should have been compiled previoulsy.
In fact, my question was more general, since it happens not only for
this project, but for all I try to build of the same kind (i.e.
containing Ada + C sources) :
1) isn't GPS supposed to work as I remember ('automatically' compile Ada
files with gnatmake, C files with gcc, bind and link it all)?
2) if it is, what are the topics to select in the project wizard to
achieve it (the only relevant I found are language and source
directories selection)
Thanks in advance
AL
------------------------------------------------------
project Cde_Moteur is
for Languages use ("Ada", "C");
for Source_Dirs use (".", "../../pc/ada", "../../pc/c",
"../../../general/nap lib/ada");
for Main use ("cde_moteur.adb");
package Builder is
for Default_Switches ("ada") use ("-a", "-m", "-g");
end Builder;
package Naming is
for Specification_Suffix ("C") use ".h";
for Implementation_Suffix ("C") use ".c";
end Naming;
package Compiler is
for Default_Switches ("ada") use ("-O2", "-gnatf", "-g");
for Default_Switches ("c") use ("-O2", "-g", "-Wall");
end Compiler;
end Cde_Moteur;
------------------------------------------------------
More information about the gps-users
mailing list