Help compiling libimobiledevice please

Programming
Tutor: None Selected Time limit: 7 Days

Hi,

Please can anyone show me how to compile the 'Libimobiledevice' tools on windows please? There website says its cross-platform but there seems to be no information about how to compile them for windows. I have idevicerecovery working on ubuntu by following some instructions but i'd like to have the complete toolset running under windows.

Thanks

Nov 30th, -0001
Here is the answer


LIBIMOBILE DEVICE LIBRARY FOR WINDOWS
Now you can use libimobiledevice on windows. For example, you can develop a win app to synchronize Bookmark between Firefox and iPhone etc.


About
=====
A library you can used on WINDOWS to communicate with services running on Apple iPhone/iPod Touch devices. You can find source code here http://www.libimobiledevice.org/. And there is a list about what this library support. I just compiled it on Windows, so you can use it in your win32 apps.
I both compiled static and dynamic-link library. You can choose one which you prefer, BUT please read this FIRST.
Static Library
==============
You should install MinGW gcc in your system before using this static library. Because i'm too stupid and lazy to solve some problem there
So you can only compile it on MinGW-gcc and use it on windows.
Examples:
gcc -o ideviceinfo ideviceinfo.c -I./Include/ ./Lib/imobiwin32.lib ./Lib/glib-2.0.lib ./Lib/libgcrypt.a ./Lib/libgpg-error.a ./Lib/libxml2 -static

gcc -o idevice_id idevice_id.c -I./Include/ ./Lib/imobiwin32.lib ./Lib/glib-2.0.lib ./Lib/libgcrypt.a ./Lib/libgpg-error.a ./Lib/libxml2 -static
gcc -o idevicepair idevicepair.c -I./Include/ ./Lib/imobiwin32.lib ./Lib/glib-2.0.lib ./Lib/libgcrypt.a ./Lib/libgpg-error.a ./Lib/libxml2 -static
Dynamic-Link Library
====================
This one is much easier to use if you prefer MSVC than gcc.
I only test in Microsoft Visual Studio 2008/2010.
Notice
Maybe you need dynamically load free function which exported from msvcrt.dll and use it to free some memory. Since some functions use malloc exported from msvcrt.dll. For example
Both examples had define function ptr Myfree. Like this
typedef void (*MYFREEFUNC)(void *memblock);
MYFREEFUNC Myfree;
void InitFreeFunc()
{
HMODULE hMod = LoadLibrary(_T("msvcrt.dll"));
Myfree = (MYFREEFUNC)GetProcAddress(hMod, "free");
}
example 1

char *devname = NULL;
lockdownd_get_device_name(client, &devname);
//lockdownd_get_device_name will use malloc exported from
//msvcrt.dll to allocate memory block for devname.
//Now you need to free this memory block.
//If you use free function directly you will get a asset error,
//since msvc link free which exported by msvcr[xx].dll, not msvcrt.dll
Myfree(devname); //right
example 2

plist_t array = NULL;
//...
uint32_t isize = plist_array_get_size(array);
char* pxml;
pxml = NULL;
plist_to_xml(array, &pxml, &isize);
//Here, this function alse use malloc exported from msvcrt.dll to
//allocate memory block.
Myfree(pxml);
ChangeLog
============
Jan 29, 2012
Update libplist-1.4 to libplist-1.8
Update usbmuxd-1.0.7 to latest master git (Until Jan 29)
Update libimobiledevice-1.1.1 to latest master git


Visit website
www.bingtech.net
or google - ilibimobile device for windows
Jun 13th, 2013

Hi,

Thanks for the reply. I already saw this post but I was having problems with it. I got as far as getting stuck with 'couldn't find glib.dll whilst trying to compile. As the post was over a year old I figured something may have changed since then. Do you know why it may not be compiling for me?


Thanks

Jun 13th, 2013

May be you have already tried these sites but i thought you could try some of my suggestions

1)  GitHub

2)  Url   http://www.libimobiledevice.org/

3)Url  http://www.softpedia.com/get/Programming/Components-Libraries/libimobiledevice.shtml

these sites may have updated info, Tried my level best



Jun 13th, 2013

Hi,

I did try searching those sites before posting here but thanks for the suggestions anyway, I appreciate your help.

Jun 13th, 2013

Thanks for understanding but I did try my best to find the answer for your query

Jun 13th, 2013

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
...
Nov 30th, -0001
...
Nov 30th, -0001
Dec 2nd, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer