Hi everyone!
Im trying to compile a project ive found on internet, and im having a really bad time, with libraries I currently not have.
First of all, im running Windows 7 32 bit, with MinGW 4.8.2 32 bit and Qt 4.8.6. Im using this old version of Qt because it was the version the project was created with, and when I tried to compile it with the latest Qt, I had even more trouble.
The project has a libs-windows folder, that originally comes empty. When you compile it, it gives you errors like
../kiax2core/libs-windows/libjson.a: No such file or directory
Among others, Im mentioning this one because its the library I havent been able to get my hands on, (the rest I easily found them on the internet). First of all… Isnt the .a extension supposed to be for Linux? The project comes for either Linux, Windows or Mac, but im certain that ive placed the correct defines and commented the correct parts to specify im running it on windows.
Im going to explain what I did, so you guys can tell me what im doing wrong.
First of all, ive downloaded the latest version of libjson from here
http://projects.snarc.org/libjson/download/
Unfortunately, theres no libjson.a file in here. But theres a makefile. As I have currently a virtual machine running Fedora, with make, I passed the library to Fedora, ran make, and got the libjson.a file, among others. When I place the libjson.a file into the folder where its supposed to be, I start getting undefined references to functions that are clearly from this library, for example
undefined reference to “json_tokener_parse”
undefined reference to “json_object_object_get”
undefined reference to “json_object_get_int”
undefined reference to “json_object_get_string”
This library doesnt seem to be working… Id like to mention, that, on the project folders, I can find kiax2core->includes->json
Inside this folder I have the following files:
arraylist.h
bits.h
debug.h
json.h
json_object.h
json_object_private.h
json_tokener.h
json_util.h
linkhash.h
printbuf.h
All of them are included on the project, but they dont work. The json.h for example only has the following code inside
/*
* $Id: json.h,v 1.6 2006/01/26 02:16:28 mclark Exp $
*
* Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
* Michael Clark <michael@metaparadigm.com>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See COPYING for details.
*
*/
#ifndef _json_h_
#define _json_h_
#ifdef __cplusplus
extern "C" {
#endif
#include "bits.h"
#include "debug.h"
#include "linkhash.h"
#include "arraylist.h"
#include "json_util.h"
#include "json_object.h"
#include "json_tokener.h"
#ifdef __cplusplus
}
#endif
#endif
When I built it on fedora, i got a json.h with much more stuff into it, so i tried appending it to this small json.h, and i also tried replacing it, with no luck. I know im an extreme begginer with libraries and linking stuff, my guess is that im doing everything absolutly wrong. So could someone point me to a page where explains me what I should be doing, or at least give me a few guidelines?
Thanks in advance!
Regards,
Nicolas
↧