[MonoDevelop] [Problem] Project reference with vala

Jan Hudec bulb at ucw.cz
Thu Apr 9 13:27:51 EDT 2009

Hello Folks,

I am playing with some Vala code in monodevelop. I currently have two projects
in the solution -- one library and one unit test for it -- and plan to add a
few more. And I have a problem with the reference from the test project to the
library one works only partly.

I mean, the valac is given correct .vapi file to generate the code, but it is
*not* given either include path nor the library file for the C compiler, so 
vala generates the C sources, but compiling them fails.

I have currently worked around the problem by manually adding
appropriate --Xcc= options in the Build/Code Generation properties. But as I
said, I plan to add a few more projects and it will quickly grow ugly.

Do you have any better proposal? Or should this be reported as a (possibly
wish-list) bug?

Note, that monodevelop generated a .md.pc file for me and even seems to
regenerate it with every build. It only includes the Libs: definition and no
Cflags: and does not seem to be used anyway. Should it be used somehow, or
does it only exist as a template?

To complicate matters a little more, I am not entirely sure whether linking
the libraries should be done by path to the .so file (which will generate
rpath) or -L and -l options and using LD_LIBRARY_PATH for execution (which is
pain, but it will avoid the rpath, which is undesired for installed binaries).

For unit-tests the rpath variant seems better, but the installed binary
(I have none yet, but I will have) should not have rpath and I fear MD can't
tell those cases apart.



More information about the Monodevelop-list mailing list