Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eclipse: library (libjson-c) not found, but configured #378

Closed
developer-lucas opened this issue Nov 19, 2017 · 7 comments
Closed

Eclipse: library (libjson-c) not found, but configured #378

developer-lucas opened this issue Nov 19, 2017 · 7 comments

Comments

@developer-lucas
Copy link

Good afternoon. It is already configured in Eclipse, I even use other libraries, such as LibCurl, for example. But I checked the other libraries I have files in the / inc folder and files with extension * .so in the / lib folder. In the json-c installation package I do not have these files. And at the time of compiling, I set the settings according to the attached image, however it says not find. Would you help me?
tela4
tela1
tela2

@ploxiln
Copy link
Contributor

ploxiln commented Nov 19, 2017

Sorry, this project is not the right place to ask about using eclipse.

json-c has to be built somehow, and the resulting library and header needs to be installed somewhere. If you understand how to do that manually, and you find and isolate a specific bug in the json-c build system, you can report it here. But if you don't know how to build and install c libraries in general, or for the IDE you are using, this project can't help you, sorry.

@developer-lucas
Copy link
Author

@ploxiln
Since you are trying to help me, I am not able to compile due to the following error:

json_object.c: 777: undefined reference to _finite ' json_object.c: 773: undefined reference to _isnan '

How do I resolve the following?

@ploxiln
Copy link
Contributor

ploxiln commented Nov 19, 2017

Those are from https://github.com/json-c/json-c/blob/json-c-0.12.1-20160607/math_compat.h which theoretically should only apply on windows platforms - on other platforms the configure checks should pass: https://github.com/json-c/json-c/blob/json-c-0.12.1-20160607/configure#L4786-L4796

did you run ./configure?

@developer-lucas
Copy link
Author

When U try ./ configure after sh autogen.sh, the following error:

./configure: line 2798: syntax error near unexpected token autoconf-archive/m4' ./configure: line 2798: AC_CONFIG_MACRO_DIRS(autoconf-archive/m4)'

Any ideia?

@ploxiln
Copy link
Contributor

ploxiln commented Nov 20, 2017

Clearly, configure isn't working.

  • What exact version of json-c are you using?
  • Was there a configure script already there before you ran ./autogen.sh? Did you try using it as-is?
  • What versions of autoconf and automake do you have installed?
  • Can you show more output from ./autogen.sh and ./configure.sh? There are probably other error messages.

@hawicz
Copy link
Member

hawicz commented Nov 20, 2017

I suspect the minimum autoconf and automake versions specified in the "Prerequisites" section of https://github.com/json-c/json-c/blob/master/README.md (2.64 and 1.10.3, respectively) are a bit too old.
According to https://autotools.io/autoconf/macros.html, you'll need at least automake version 1.13 or autoconf 2.70 to get the AC_CONFIG_MACRO_DIRS macro.
If you don't have a convenient package for your OS to install versions that recent you should be able to follow the "Manually install and build autoconf, automake and libtool" steps at the end of the README.md, which does specify new enough versions.

@hawicz
Copy link
Member

hawicz commented Nov 21, 2017

Actually, looking at your screenshots again, based on what your file browser windows look like I suspect that you're trying to build something on MS Windows. If that is the case, .so files are totally the wrong things to be trying to link again.
If we ignore that problem, even just trying to build in Eclipse you're going to have a hard time unless you're quite familiar with what you're doing, especially since you're trying to use the rather old 0.12 branch. You'll have better luck with the most recent json-c code, and perform the json-c build with cmake and Visual Studio.
Another option is that you can try using the pre-built library over at https://ci.appveyor.com/project/hawicz/json-c

@hawicz hawicz closed this as completed Nov 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants