Reputation: 591
I'm trying to build a multi-language project in gnatbench (C/C++) and it just ignores building my c++ code. my project file looks like:
project Ralt_Pss is
for Main use ("locationalpsses_part_main.adb");
for Languages use ("Ada", "C", "C++");
for Source_Dirs use ("../../../AdaExamples/CPP", "src","../../../AdaExamples/ARINC653", "../../../ada_common/face");
for Object_Dir use "obj";
package Compiler is
for Default_Switches ("ada") use ("-g", "-gnato", "-gnatwa", "-gnatQ", "-gnat05");
end Compiler;
package Builder is
for Default_Switches ("ada") use ("-g");
end Builder;
package Ide is
end Ide;
package Naming is
for Spec_Suffix ("c++") use ".h";
for Body_Suffix ("c++") use ".cc";
end Naming;
end Ralt_Pss;
GPS seems to build it properly, but gnatbench doesn't.Also, I've noticed that gnatbench builds using gnatmake, and GPS builds using gprbuild. Any idea how to fix this besides just not using gnatbench?
Upvotes: 1
Views: 385
Reputation: 25501
You need gprbuild for multi-language projects.
I'm afraid I don't know for sure how to tell Eclipse to do that; you could try changing gnatmake
in the gnatbench .xml
files to gprbuild
.
Googling "tell gnatbench to use gprbuild" shows that AdaCore fixed this 7 Aug 2012, you'll probably need to wait a few months for GNAT GPL 2013 for the fix to be released publicly though.
Upvotes: 1