473,322 Members | 1,307 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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 4469
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ophir | last post by:
Hello all ! I wrote a simple ActiveX DLL to wrap winsock functionality so I can use it in an ASP page. I call it MyWinSock In the Class module I use this declaration: Dim ctlSocket as...
3
by: Bill | last post by:
When vb6 Winsock.RemoteHost is set to "127.0.0.1", c# socket listener cannot hear connect request (my old vb6 winsock listener could hear it...). Why doesn't this work, and is there a work...
7
by: Nadav | last post by:
Hi I am writing some kind of a storage system that have to deal with large amounts of data passing over the net, Now, I Wonder... traditional programming would use win32 Winsock DLL as the means...
1
by: Tom Edelbrok | last post by:
I am creating a class libary of VB.Net utilities that will be built into a DLL. This DLL can be used by our development VB.NET programs when they want to call standard in-house utilities. I...
1
by: Vincent | last post by:
I do not have a strong grasp of the winsock library, but have started fiddling around with it a bit. My first impression is that using winsock in Access is a bit unwieldy. I was making a...
1
by: Nicolas Ghesquiere | last post by:
Hello I have a problem with my current program. The meaning of the program is to allow users to login to a server to allow them to access the internet. My program communicates with a MS isa...
1
by: kpaxoid | last post by:
An odd problem. Application runs fine in the VB6 IDE, but when compiled, as soon as the application attempts to execute Winsock.Listen 'Winsock is created by Winsock = New Winsock the...
3
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
(I have posted this separately to comp.lang.c++ and comp.lang.c, reason being that I'd like a response from both communities, but I haven't cross-posted it because I think it's best not to mix C...
4
by: imaloner | last post by:
I am posting two threads because I have two different problems, but both have the same background information. Common Background Information: I am trying to rebuild code for a working,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.