0
votes

I'm trying to create a simple project in GPS environment and compile it against the ORBExpress packages. The orbexpress directory contains a subdirectory "include" with .ads file and another subdirectory "lib" with .ali files.

The toolchain that is set in the GPS environment is gnatmake 6.1.1 (I think the version does not matter though).

When I try to build the project, I get the messages such as "external source corba.ads is not part of any project; cannot be compiled without gnatmake switch -x".

If I add the -x switch to gnatmake line in Switches, I get the following error: "cannot generate code for file 'corba.ads' (package spec)".

I looked at the gnatmake manual and it seemed that -aL'dir' switch is the thing I need (supposedly, tells to ignore compilation for units whose .ali files can be found in dir, but adding this switch seems to have no effect...

Please help.

1
Does ORBexpress come with a .gpr file? if so, you’d probably find it simpler in the long run to write your own project GPR and with the ORBexpress one. Even if not, it’s probably not too hard to write your ownorbexpress.gpr.Simon Wright
It does not, at least in what I have, there is no .gpr file. Just for education - lets say I write my own .gpr file - if I add it as a dependency to my project, would the OrbExpress project be recompiled everytime?Anorflame
The OrbExpress project wouldn’t be compiled every time, especially if you declare it as “externally built” -- see this answer.Simon Wright
I'll try it, Thanks!Anorflame

1 Answers

1
votes

Well, I got it to work- I was using a subdirectory 'bin' in my project directory as a subdirectory for object files. Once I removed this setting, everything worked and compiled properly, using only -aIPath\to\library\include and -aLPath\to\library\lib switches in gnatmake tab.

I'm not sure why it didn't work, but this is how I got it to work.