Thread: Dev-C++.........linking?

  1. #1

    Question Dev-C++.........linking?

    hey. i recently downloaded'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


  2. #2

    Unhappy anyone?


  3. #3
    ¡Amo fútbol!
    Join Date
    Dec 2001
    I think if you include windows.h, you don't have to worry about the linking. I might be wrong though.

  4. #4
    Registered User tgm's Avatar
    Join Date
    Jun 2002
    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.

  5. #5
    Join Date
    Jan 2002
    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.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems linking with g++
    By Just in forum Linux Programming
    Replies: 11
    Last Post: 07-24-2006, 01:35 AM
  2. Grrr.... SDL Linking Problem
    By 7EVEN in forum Game Programming
    Replies: 5
    Last Post: 08-12-2005, 08:44 PM
  3. New to Dev C++/<windows.h>...
    By Cilius in forum C++ Programming
    Replies: 3
    Last Post: 02-23-2005, 01:05 AM
  4. Glut and Dev C++, Programs not Quitting?
    By Zeusbwr in forum Game Programming
    Replies: 13
    Last Post: 11-29-2004, 08:43 PM
  5. Basic Window Creation, Dev C++ Linking Error
    By Tronic in forum Windows Programming
    Replies: 2
    Last Post: 11-27-2004, 06:03 PM