delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/06/06:55:25

Message-ID: <3619E28B.86CF7E81@mailexcite.com>
Date: Tue, 06 Oct 1998 05:27:41 -0400
From: Doug Gale <dgale AT mailexcite DOT com>
X-Mailer: Mozilla 4.05 [en] (Win95; U)
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Winsock programming using RSXNTDJ!
References: <3613EFAE DOT 91C01D2 AT direct DOT ca>
NNTP-Posting-Host: oshawappp18.idirect.com
Organization: "Usenet User"
Lines: 33
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com


Mark Ryan Reyes wrote:

> I can't make the Winsock API in RSXNTDJ to work!
>
> I can compile my source code, produce a .exe file, but then when I run
> it,  the SIGSEGV.... errors occur!
>
> Anyone knows why?
>
> Thanks in advance....
> Mark.

Did you make an import library for wsock32.dll? If not, get into the
directory of your sources, and type:

makelib c:\windows\system\wsock32.dll

This will produce a library that lets you access stuff in the dll. The
library created will be called "wsock32.a". gcc expects libraries to begin
with lib, so rename that to libwsk32.a. Then, in your link command line,
append -lwsk32

Without that library, the linker can't see any functions with names from
the winsock dll. You will get a SIGSEGV whenever you access an undefined
symbol. The problem is in the linker that comes with rsxntdj - it doesn't
give errors for undefined symbols. If this happens in the future, one way
to see if you have undefined symbols is to link it with the original djgpp
linker. If you try this, switch back to the rsxntdj linker and re-link
before you run it!


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019