473,804 Members | 2,136 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.s o ->
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.s o ->
libwine_tsx11.s o.1.0
-rwxr-xr-x 1 root root 97902 Sep 5 2002 libwine_tsx11.s o.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.s o ->
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.s o ->
wine/x11drv.dll.so

look at this list, and at the beginning, there is no link of
libwinsock.dll. so, libws2_32.dll.s o 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 "Segmentati on fault".

so, I run gdb, and find

Program received signal SIGSEGV, Segmentation fault.
0x40035614 in dllname () from /usr/lib/wine/libws2_32.dll.s o
(gdb)

what is wrong?? and anyone knows ??
and I search the google, no result.
Thanks~~

Ka. J.Ch

Nov 13 '05 #1
10 4518
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.q uestions


--

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.q uestions

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.q uestions


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.q uestions

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.pow ernet.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.q uestions


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.co m> wrote in bg***********@m ail.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.s o -> 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.s o -> libwine_tsx11.s o.1.0
-rwxr-xr-x 1 root root 97902 Sep 5 2002
libwine_tsx11.s o.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.s o -> 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.s o -> wine/x11drv.dll.so

look at this list, and at the beginning, there is no link of
libwinsock.dll. so, libws2_32.dll.s o 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 "Segmentati on fault".

so, I run gdb, and find

Program received signal SIGSEGV, Segmentation fault.
0x40035614 in dllname () from /usr/lib/wine/libws2_32.dll.s o
(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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
9343
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 Variant.
3
694
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 around I can make on the C# side to hear the connect request? -Bill (don't reply by e-mail, the address is a fake) ______________________________ Steps to reproduce: Start the C# Listener
7
2856
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 of data transportation... now, indigo is the new communication layer of the CLR, - Does indigo uses Winsock internally? - Is it possible to use indigo for such a task? - I assume using indigo has it's performance penalty ( doesn't it ? - Does...
1
1386
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 create the class libary MYCLASSLIBRARY.VB by inserting a whole bunch of classes, ie: public class class1 end class public class class2
1
1793
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 connection to a daytime server on the Internet to retrieve the current date and time and the only way I could reliably retrieve the information was to add a timer event to the form from which I made the connection call. I would basically use the timer...
1
5437
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 server to make a rule for that IP for the time-credits left for that user. My problem is that so far, the program can handle everything except more then one client, and i have done my best, but i can't find a decent solution
1
1787
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 application crashes Windows requesting permission to send Microsoft a report. Any ideas appreciated. Thank you.
3
2247
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 and C++ discussion) I want to get into doing some network programming. I'd like to find a good cross-platform networking library, but failing that, I'd settle for something that'll work on Linux. I don't mind whether the libary is C or whether...
4
5732
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, commercially sold application with only partial build instructions. The previous maintainer of the code (a mixture of C and C++) is no longer with the company, but when he built the code he used MSVC++, and though I am not certain of the version he was ...
0
9716
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10604
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10359
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10101
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9177
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7643
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6870
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.