Re: Mixing Ada and C++
Mathieu Dubois <[email protected]> Tue, 20 Jul 2010 10:27:19 +0200
| Newsgroups | gmane.comp.ide.gps.user |
|---|---|
| Message-ID | <[email protected]> |
On 07/19/2010 05:13 PM, Emmanuel Briot wrote: >> GPS compile the Ada main file without problem. However when I try to >> build the C++ one it stops immediately saying ""test_pae.cpp" is not a >> source of any project"... >> > GPS is not a compiler, so it does not compile anything. However, it spawns a > builder, like gnatmake or gprbuild, and that's the tool that prints the error > message you are seeing. > Sure but one would expect that the creation of a project spawns the right tool (of course this is a very hard task)... > Make sure you are using gprbuild as the printer, gnatmake is an Ada only tool > Thanks. I can compile the programs from the command-line with gprbuild -P test_mix_languages.gpr test_pae.cpp But how can I use grbuild from GPS? Do I have to create a target (via Build -> Settings -> Targets) or can I choose the builder from GPS? Apparently pre-defined targets use the %builder variable which I assume points to the current build tool (gnatmake by default). Also I had to manually choose g++ (not gcc) as the compiler for C++ (otherwise I got the message "test_mix_languages.gpr:1:09: warning: no compiler specified for language "C++", ignoring all its sources"). Last but not least, on my machine (Ubuntu 10.04 with distribution packages), GPS is very slow when working on C/C++ files (for instance several seconds for modifying a file). Thanks for your help