Author Topic: GNE + MigW + HawkNL  (Read 6881 times)


  • User
  • *
  • Posts: 1
GNE + MigW + HawkNL
« on: April 10, 2007, 08:22:10 AM »
Hello Gillius,

my current problem is, I am not able to compile/link all necessary
components correctly with MingW.
I do not understand the way I have to use static and dynamic libraries.
I have compiled everything (correctly?) with MingW:
- a static lib HawkNL.a
- a static lib GNE.a
When I try to build the target application the linker complains about
missing functions (all of them in winsock.lib).
So the question is: if all of those libraries need to be compiled in a
special manner, so how can I get a working winsock, since for sure there
is no winsock.a provided by Microsoft?
Or is MingW able to combine different libs?

Thank you for any hint


  • Administrator
  • User
  • *****
  • Posts: 147
Re: GNE + MigW + HawkNL
« Reply #1 on: April 10, 2007, 09:36:51 AM »
a "lib" or .a file is only partially linked -- it is only linked to its own internal symbols. When you make your final EXE, you need to provide all of the libraries needed by all code. So you need to provide the winsock library on your link line. For MinGW I'm not sure how to do this off hand. I think the way my instructions work on my tutorial is if Hawk is in its DLL form, linked dynamically to winsock. I don't think GNE itself has a dependency on that, so that's why I never had to deal with it (directly).
Gillius's Programming