3

I am try to create a application in Vala, but I need libsoup and checkout with this command: pkg-config --list-all | grep soup. I have libsoup, but if I try to compiling with this command: valac --pkg gtk+-3.0 libsoup test.vala, I get this error message: error: libsoup not found. My question is what is the problem?

1 Answer 1

1

I am being told by people more knowledgable than myself for Vala that your compile command is not quite right. Every package needs the --pkg prefix, and you need to specify the full packages name as you have done with gtk+.

Something like valac soup.vala --pkg libsoup-2.4 --pkg gtk+-3.0 should work out a whole lot better for you.

2
  • The part about needing to specify the version isn't quite right. You need to specify the full package name of whatever package you're using. Many libraries, such as gtk+ and libsoup, put a version number in the pkg-config name (which is the same as the name of the vala binding), but most do not. The actual version of the library doesn't always (or even usually) match the version in the package name… pkg-config --modversion libsoup-2.4 = 2.53.1 here.
    – nemequ
    Commented Nov 23, 2015 at 1:15
  • ohh soo simple ^^ thanks but i have in anjuta the same problem but i add the lib to my project have somebody a good tutorial for anjuta ? Commented Nov 24, 2015 at 8:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.