K
Ka
Hi, all
I use Redhat8.0, and I complie a program with wine in this box,
my wine version is wine-20020605-2 by Redhat. and after install wine,
I just locate the library in /usr/lib/wine
lrwxrwxrwx 1 root root 17 Jul 29 12:10 libgdi32.dll.so ->
wine/gdi32.dll.so
lrwxrwxrwx 1 root root 20 Jul 29 12:10
libkernel32.dll.so -> wine/kernel32.dll.so
lrwxrwxrwx 1 root root 17 Jul 29 12:10 libntdll.dll.so ->
wine/ntdll.dll.so
lrwxrwxrwx 1 root root 18 Jul 29 12:10 libuser32.dll.so ->
wine/user32.dll.so
lrwxrwxrwx 1 root root 14 Jul 29 12:10 libwine.so ->
libwine.so.1.0
-rwxr-xr-x 1 root root 19971 Sep 5 2002 libwine.so.1.0
lrwxrwxrwx 1 root root 20 Jul 29 12:10 libwine_tsx11.so ->
libwine_tsx11.so.1.0
-rwxr-xr-x 1 root root 97902 Sep 5 2002 libwine_tsx11.so.1.0
lrwxrwxrwx 1 root root 22 Jul 29 12:10
libwine_unicode.so -> libwine_unicode.so.1.0
-rwxr-xr-x 1 root root 836708 Sep 5 2002
libwine_unicode.so.1.0
-rw-r--r-- 1 root root 50514 Sep 5 2002 libwine_uuid.a
*lrwxrwxrwx 1 root root 19 Jul 29 20:31
libwinsock.dll.so -> wine/winsock.dll.so
lrwxrwxrwx 1 root root 20 Jul 29 12:10
libwinspool.drv.so -> wine/winspool.drv.so
*lrwxrwxrwx 1 root root 18 Jul 29 14:31 libws2_32.dll.so ->
wine/ws2_32.dll.so
*lrwxrwxrwx 1 root root 19 Jul 29 13:05
libwsock32.dll.so -> wine/wsock32.dll.so
lrwxrwxrwx 1 root root 18 Jul 29 12:10 libx11drv.dll.so ->
wine/x11drv.dll.so
look at this list, and at the beginning, there is no link of
libwinsock.dll.so, libws2_32.dll.so and libwsock32.dll.so,
but my program must load winsock2, so I do them my myself manually.
as below the part of my program:
#include <winsock2.h>
#include <stdio.h>
#include <windows.h>
#include <process.h>
#include <string.h>
#include <winbase.h>
so, I link them from /usr/lib/wine/wine to /usr/lib/wine
and then run command ldconfig.
and then I compile my program test.c with:
#gcc -I/usr/include/wine/wine -I/usr/include/wine/wine/msvcrt -L/usr/lib/win
e -o test test.c -lws2_32.dll
and the strange thing is I must locate the process.h in
/usr/include/wine/msvcrt .
and run this test,
#./test
I got error "Segmentation fault".
so, I run gdb, and find
Program received signal SIGSEGV, Segmentation fault.
0x40035614 in dllname () from /usr/lib/wine/libws2_32.dll.so
(gdb)
what is wrong?? and anyone knows ??
and I search the google, no result.
Thanks~~
Ka. J.Ch
I use Redhat8.0, and I complie a program with wine in this box,
my wine version is wine-20020605-2 by Redhat. and after install wine,
I just locate the library in /usr/lib/wine
lrwxrwxrwx 1 root root 17 Jul 29 12:10 libgdi32.dll.so ->
wine/gdi32.dll.so
lrwxrwxrwx 1 root root 20 Jul 29 12:10
libkernel32.dll.so -> wine/kernel32.dll.so
lrwxrwxrwx 1 root root 17 Jul 29 12:10 libntdll.dll.so ->
wine/ntdll.dll.so
lrwxrwxrwx 1 root root 18 Jul 29 12:10 libuser32.dll.so ->
wine/user32.dll.so
lrwxrwxrwx 1 root root 14 Jul 29 12:10 libwine.so ->
libwine.so.1.0
-rwxr-xr-x 1 root root 19971 Sep 5 2002 libwine.so.1.0
lrwxrwxrwx 1 root root 20 Jul 29 12:10 libwine_tsx11.so ->
libwine_tsx11.so.1.0
-rwxr-xr-x 1 root root 97902 Sep 5 2002 libwine_tsx11.so.1.0
lrwxrwxrwx 1 root root 22 Jul 29 12:10
libwine_unicode.so -> libwine_unicode.so.1.0
-rwxr-xr-x 1 root root 836708 Sep 5 2002
libwine_unicode.so.1.0
-rw-r--r-- 1 root root 50514 Sep 5 2002 libwine_uuid.a
*lrwxrwxrwx 1 root root 19 Jul 29 20:31
libwinsock.dll.so -> wine/winsock.dll.so
lrwxrwxrwx 1 root root 20 Jul 29 12:10
libwinspool.drv.so -> wine/winspool.drv.so
*lrwxrwxrwx 1 root root 18 Jul 29 14:31 libws2_32.dll.so ->
wine/ws2_32.dll.so
*lrwxrwxrwx 1 root root 19 Jul 29 13:05
libwsock32.dll.so -> wine/wsock32.dll.so
lrwxrwxrwx 1 root root 18 Jul 29 12:10 libx11drv.dll.so ->
wine/x11drv.dll.so
look at this list, and at the beginning, there is no link of
libwinsock.dll.so, libws2_32.dll.so and libwsock32.dll.so,
but my program must load winsock2, so I do them my myself manually.
as below the part of my program:
#include <winsock2.h>
#include <stdio.h>
#include <windows.h>
#include <process.h>
#include <string.h>
#include <winbase.h>
so, I link them from /usr/lib/wine/wine to /usr/lib/wine
and then run command ldconfig.
and then I compile my program test.c with:
#gcc -I/usr/include/wine/wine -I/usr/include/wine/wine/msvcrt -L/usr/lib/win
e -o test test.c -lws2_32.dll
and the strange thing is I must locate the process.h in
/usr/include/wine/msvcrt .
and run this test,
#./test
I got error "Segmentation fault".
so, I run gdb, and find
Program received signal SIGSEGV, Segmentation fault.
0x40035614 in dllname () from /usr/lib/wine/libws2_32.dll.so
(gdb)
what is wrong?? and anyone knows ??
and I search the google, no result.
Thanks~~
Ka. J.Ch