Mail Archives: djgpp/1998/10/06/06:55:25
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 -