Meson and Vala problem?

Hello friends!
I have a problem with a Vala project I’ve been working on and off (on for way too many years).

I switched the project from CMake to Meson when I decided to re-write the whole thing from scratch.

The problem is that I can’t seem to be able to make the thing build.

Here is the code:

When I try to compile I get the error that vprocessing_util_structure_pair_init is undefined, despite that when I run strings on meson-generated_src_utils_structure.c.o I can see the string for the function.

First I thought that it was a problem with the ordering of the files when linking, but that did not help, so I tried to remove the -Wl,--no-undefined and It worked.

So… Anyone else have the same sort of problem, is it a problem with my file structure or how the project is set up?

I can’t really start testing before I can build it… So that is the first thing I need to do.

I looked at the generated C files in the build directory. The problem seems to be that the definition of vprocessing_util_structure_pair_init is static. You can fix that by making the Pair constructor public to match the struct itself.

This is clearly a bug in the vala compiler; it should have at least failed earlier. If you can make a minimal test case, please file an issue on gitlab.

That’s strange, as I thought that struct members were always public.

I did make a minimal test case and it passed. having a struct with a constructor that did not have this behaviour.

But thanks, now it works.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.