473,388 Members | 1,066 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,388 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 4478
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.