469,299 Members | 2,069 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,299 developers. It's quick & easy.

what is wrong with the winsock libary beneath Linux ??

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

Nov 13 '05 #1
10 4289
Ka wrote:
Hi, all

I use Redhat8.0, and I complie a program with wine in this box, [snip] what is wrong?? and anyone knows ??


This has nothing to do with comp.lang.c

You probably should ask your question in comp.emulators.ms-windows.wine or
comp.os.linux.questions


--

Lew Pitcher, IT Consultant, Application Architecture
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed here are my own, not my employer's)

Nov 13 '05 #2
Ka
Thanks! I think it is helpful here may be many experienced persons with C
library and programming.

Ka. J. Ch.
This has nothing to do with comp.lang.c

You probably should ask your question in comp.emulators.ms-windows.wine or
comp.os.linux.questions

Nov 13 '05 #3
Ka wrote:
Thanks! I think it is helpful here may be many experienced persons with C
library and programming.


Plase don't top-post.
This has nothing to do with comp.lang.c

You probably should ask your question in comp.emulators.ms-windows.wine
or comp.os.linux.questions


There are probably here many people experienced with dogs, children,
science fiction, compilers, and the history of the American Civil War;
nevertheless, those things are not on topic here.

--
Chris "electric hedgehog" Dollin
C FAQs at: http://www.faqs.org/faqs/by-newsgrou...mp.lang.c.html
C welcome: http://www.angelfire.com/ms3/bchambl...me_to_clc.html
Nov 13 '05 #4
Ka
Thanks! I think it is helpful here may be many experienced persons with C
library and programming.
Plase don't top-post.


No top-post! just because I am in the East-Hemisphere, and
I use my local time correctly.
there were always some people in news group doubt my words, but it is the
truth. This has nothing to do with comp.lang.c

You probably should ask your question in comp.emulators.ms-windows.wine
or comp.os.linux.questions

There are probably here many people experienced with dogs, children,
science fiction, compilers, and the history of the American Civil War;
nevertheless, those things are not on topic here.


?? what is the meaning ? I am not an American :(
so, is the right place to post my question ??
hehe :)
another reason: here is more visitors than other group
:pp
--
Chris "electric hedgehog" Dollin
C FAQs at: http://www.faqs.org/faqs/by-newsgrou...mp.lang.c.html
C welcome: http://www.angelfire.com/ms3/bchambl...me_to_clc.html



Nov 13 '05 #5
Ka wrote:
Hi, all

I use Redhat8.0, and I complie a program with wine in this box,


There's your problem right there. You should get your wine in a bottle. The
boxed stuff always tastes foul.

<snip>

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #6
Ka wrote:
> Thanks! I think it is helpful here may be many experienced persons with C > library and programming.
Plase don't top-post.


No top-post! just because I am in the East-Hemisphere, and
I use my local time correctly.


That's not what top-posting is; I'm glad to see you've stopped doing it.
there were always some people in news group doubt my words, but it is the
truth.
What is?
>> This has nothing to do with comp.lang.c
>>
>> You probably should ask your question in
>> comp.emulators.ms-windows.wine or comp.os.linux.questions


There are probably here many people experienced with dogs, children,
science fiction, compilers, and the history of the American Civil War;
nevertheless, those things are not on topic here.


?? what is the meaning ? I am not an American :(


Just because there are people experienced on some topic X in some
newsgroup Y doesn't mean that you should post questions about X if
they are not topical for Y. You post questions that *are* topical
for Y. If you're not sure what's topical, you read a bunch of postings
from the group (live, or archived [not ancient]) to find out.
so, is the right place to post my question ??
Your original question is off-topic in comp.lang.c, which is where I'm
posting from.
hehe :)
another reason: here is more visitors than other group


So? That doesn't make it topical. Think of it as more people to annoy.
If you think that's a *good* thing, you have problems.

--
Chris "electric hedgehog" Dollin
C FAQs at: http://www.faqs.org/faqs/by-newsgrou...mp.lang.c.html
C welcome: http://www.angelfire.com/ms3/bchambl...me_to_clc.html
Nov 13 '05 #7
Richard Heathfield wrote:
Ka wrote:

Hi, all

I use Redhat8.0, and I complie a program with wine in this box,


There's your problem right there. You should get your wine in a bottle. The
boxed stuff always tastes foul.

<snip>

No, no, Richard; little boys must not taste wine.
Nov 13 '05 #8
Do you call WSAStartup to initialize ws2_32 library?

uli

Ka <ka**@21cn.com> wrote in bg***********@mail.cn99.com:
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

Nov 13 '05 #9
Ka
yes, WSAStartup is called in program,
is it something wrong with the version of winsocks of Linux ??
I am first program with this library, and I test
my program in Redhat 7.2, even it can not find the correct include files!!!
why so many changes with all version librarys of winsocks ??
Do you call WSAStartup to initialize ws2_32 library?

uli

Nov 13 '05 #10
Steve Zimmerman <st******@sonic.net> wrote:
No, no, Richard; little boys must not taste wine.


Tsk... straightlaced Merkin silliness. Still feeling the last twitches
of the Prohibition, aren't you?

Richard
Nov 13 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Tom Edelbrok | last post: by
1 post views Thread by Vincent | last post: by
1 post views Thread by Nicolas Ghesquiere | last post: by
3 posts views Thread by =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.