Re: [gps-users] Compiling C sources

Martin Krischik <[email protected]> Thu, 10 Feb 2005 08:06:19 +0100
Newsgroups gmane.comp.ide.gps.devel
Message-ID <[email protected]>
Am Mittwoch, 9. Februar 2005 18:09 schrieb Alejandro R. Mosteo:
> Hello,
>
> I'm compiling a project which has some C sources besides the Ada ones.
> I've set up the project with both languages checked, set the C switches
> and so on.
>
> Now, I find that when building the project the C sources aren't
> compiled, so the final link fails because of some missing symbols. If I
> manually open these files, compile, and add pragma Linker_Options to
> include its object files, everything works.
>
> I've tried manually editing the project file to add the Source_Files
> property adding only the C files. Doing so the remaining Ada sources are
> no longer counted in the project. So I suppose this could work, but then
> I ought to add manually all project files to this list. ?
>
> So, I suspect I'm missing the proper easy way to automatize this, but I
> don't find it in the GPS documentation. Any ideas?

Start with a very simple question: did you add the C language to your list of 
languages used?

  for Languages use ("Ada", "C");

And did you add a C compiler as well:

   package Ide is
      for Vcs_Kind use "CVS";
      for Compiler_Command ("c") use "gcc";
   end Ide;

Last nor Least: C/C++ support hast been significantly improved over time: To 
help you we need a couple of version numbers.

Martin

-- 
Martin Krischik
mailto://[email protected]

_______________________________________________
gps-devel mailing list
[email protected]
http://lists.adacore.com/mailman/listinfo/gps-devel
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQBCCwfwijwKaHyem9cRAnyLAJ97jcvYnG3UBEGSm9l/+DHmhWkvqQCfQGnd
sf2RJlDfPJM+lPeXdspI/eA=
=ylZw
-----END PGP SIGNATURE-----