-
Dev-C++.........linking?
hey. i recently downloaded BloodShed.net's Dev-C++ compiler, and i am trying to program sockets. I have the code all perfect, but all i need to do now is link it to wsock32.lib or something like that. can someone please tell me how to do that using Dev-C++? any help appreciated :)
Thanks!
-
anyone?
-
I think if you include windows.h, you don't have to worry about the linking. I might be wrong though.
-
Under project options there is a line for adding extra command line options and libraries. That's where you tell it to link the object files.
-
The name of the library you require is libwsock32.a and can be included as described above by tgm, either by using the full name of the lib or with the shorthand -lwsock32.
This is a general pattern ie if you look in the 'libs' directory of your install you will see the listed libs with names in that format. To include any lib in your project just replace the leading 'lib' with '-l' and drop the file extension.