Thread: Linker Problem with Dev C++

  1. #1
    Registered User
    Join Date
    Feb 2006
    Location
    Ballincollig, co. cork, Eire
    Posts
    22

    Linker Problem with Dev C++

    HI,

    I am trying to use Dev C++ to compile some sample code I got, which was written in C. With the code I have the necessary header files, .lib file and .dll files I need and they are all in the same directory as the .cpp file I am creating.

    Anyway, I keep getting variations of the following error message:

    [Linker error] undefined reference to `_imp__ETSocketLink@8'

    I am using the following code to add in the .lib file

    Code:
    #pragma comment( lib, "smbw32vc.lib" )
    That bit of code was suggested to me by a friend but he is unfamiliar with Dev.

    Now, I have no reason to assume the code is wrong. It is sample code after all. The only problem I am having is with the Linker, at the moment.

    Any help is greatly appreciated.

    Regards

  2. #2
    Registered User
    Join Date
    Feb 2006
    Location
    Ballincollig, co. cork, Eire
    Posts
    22
    Sorry,

    Figured out how myself.

    For future reference, if anyone gets a similar problem, just do the following:

    Go to Project>>Project Options
    Click on the "Parameters" tab
    Click on "Add Library or Object"
    Browse to the .lib

  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    That pragma only works with Visual Studio. Just for future reference.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linker problem
    By beene in forum Game Programming
    Replies: 1
    Last Post: 11-26-2006, 08:07 AM
  2. Dev C++ Spacing Problem
    By Darklighter137 in forum C++ Programming
    Replies: 7
    Last Post: 11-13-2006, 10:48 AM
  3. Linker Error problem
    By 7smurfs in forum C++ Programming
    Replies: 9
    Last Post: 06-07-2005, 10:28 AM
  4. linker problem with mysql
    By august_01 in forum C++ Programming
    Replies: 1
    Last Post: 04-24-2005, 11:04 AM
  5. Dev C++ problem
    By Bluehead in forum Windows Programming
    Replies: 1
    Last Post: 08-21-2002, 05:33 PM

Tags for this Thread