PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, July 25, 2022

[FIXED] How to solve a problem of including json-glib.h in a c++ file

 July 25, 2022     apt, glib, json, ubuntu     No comments   

Issue

I'm trying to compile a c++ file that requires the header json-glib.h and the compilation log says that such header is not found. I'm in ubuntu 18.04 LTS.

I've tried executing dpkg -l '*json-glib*' to check that i have such file in my system and the result is:

||/ Nombre                                       Versión                     Arquitectura                

ii  libjson-glib-1.0-0:amd64                     1.4.2-3                     amd64                     
ii  libjson-glib-1.0-common                      1.4.2-3                     all                       

So next, i executed the command pkg-config --cflags libjson-glib-1.0 and got:

Package libjson-glib-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libjson-glib-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libjson-glib-1.0' found

I tried pkg-config --cflags json-glib-1.0 , pkg-config --cflags json-glib, and pkg-config --cflags libjson-glib as well and the result is similar as above.

I also followed the instructions of the answers of Fatal error: json-glib.h file not found and https://unix.stackexchange.com/questions/297277/make-doesnt-find-an-installed-library/298035#298035 and still i have the problem.

My include in the code is:

 #include <json-glib/json-glib.h>
...

I will appreciate any help you can give me, Thanks.


Solution

Try to install the package libjson-glib-dev, after that run pkg-config --cflags json-glib-1.0



Answered By - Alvaro Denis Acosta
Answer Checked By - Timothy Miller (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing