Hi,
Managed to get these compiled on cygwin:
These are the command lines i had to use(borrowed from stardict-tools and non-essential parts removed):
gcc -Wall -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include ydp2dict.c -lglib-2.0 -o ydp2dict_dyn
gcc -Wall -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include ydp2dict.c -o ydp2dict_st /usr/lib/libglib-2.0.a /usr/lib/libintl.a /usr/lib/libiconv.a
- ydp2dict_dyn links dynamically. So requires all the additional libs like glibc, iconv, intl installed.
- ydp2dict_st is linked statically. So you should be able to use it standalone.
If you dont have full cygwin installed, consider using ydp2dict_st.exe. You will still need a barebone cygwin (at least cygwin1.dll i think).
With the -Wall option, had to make this code change(however compiles well without the -Wall):
bash-3.2$ diff -w ydp2dict-old.c ydp2dict.c
104c104
< p=arr[n].words=malloc(100);
---
> p=arr[n].words=(char*)malloc(100);
178c178
< p=arr[n].trans=malloc(strlen(words)*2);
---
> p=arr[n].trans=(char*)malloc(strlen(words)*2);
bash-3.2$
Simply exec the binary asks for dict100.dat and dict101.dat.
Hope you find it useful.
I have attached the dyn and st cygwin binary exe files in the zip file. This is my first post with an attachment. Do let me know if this works ok.
Thanks
hari